Notes on Inheritance Inheritance allows you to make specialized sub-classes that can provide additional functionality or define separate types of the class. Classes are defined in a tree structured hierarchical relationship. Classes have parents or super classes and may have children or derived classes. Consider the hierarchical relationships of animals or vehicles.
Derived classes can access the public and protected variables and methods of the super class.
Polymorphism is the ability to define actions for the parent class and then apply them to different derived classes. The keyword super refers to the super or parent class. Abstract classes exist for the sole purpose of being extended. Abstract classes can have abstract methods. An abstract method has the interface defined, but does not define the body of the method.