Skip to content

Latest commit

 

History

History
19 lines (6 loc) · 512 Bytes

File metadata and controls

19 lines (6 loc) · 512 Bytes

Inheritance

exercise01

exercise01a

define a Door constructor function. A door instance exposes the two methods open and close that chage the values of a state property respectively to open and closed.

exercise01b

define a SecurityDoor constructor function that inherits the bhehaviour from Door but once closed a security_door instance can be locked via the lock method. Invoking the unlock method, bring the security_door back to the close state.