July 2018
Beginner
202 pages
5h 42m
English
A key concept in OOP is inheritance. Inheritance allows one class to inherit functionality from another class. The class being inherited from is the parent class, the class that inherits is the child class. Another way to say this is that the child class derives from the parent class.
The child class can access all the variables and functions of its parent class. In addition to access, the child class can provide its own implementation for any function inherited from the parent class. The child class re-implementing a function of a parent class is known as function overriding.
Inheritance does not have to be linear. Single inheritance allows one object to inherit functionality from only one direct ancestor. Multiple inheritance ...