Way to go! Let’s review what you learned.
- Classes are templates for objects.
- Inheritance is when we create a parent class with properties and methods that we can extend to child classes.
- We use the
extendskeyword to create a subclass.
superkeyword calls the
constructor()of a parent class.
- Static methods are called on the class, but not on instances of the class.
If you want extra practice with inheritance, take some time to create a
Doctor class that inherits from
HospitalEmployee. The properties and methods for the
Doctor class are listed below: