What is Inheritance?
A form of software reusability – new classes are created from existing classes by absorbing their attributes and operations – overriding these with capabilities new classes require. – enhance with new capabilities
The new class (derived class) uses the data members and member functions of the base class.
New data members and member functions can be added into the new class which use the data members and member functions of the base class. – More specialized group of objects – Behaviors inherited from base class (customizable) – Additional behaviors
Single inheritance - a class derived from one base class. Multiple inheritance - a class derived from more than one base class. A base class is general, while a derived class is more specific.