- Inheritance is the process by which one object can acquire the properties of another object.
- In reality as Children get properties from Parents. Similarly in OOP(Object Oriented Programming) using inheritance a Child class can extends the data and member from its parent class.
- There are various types of inheritance, based on paradigm and specific language.
- Single inheritance : Where subclasses inherit the features of one super class. A class acquires the properties of another class.
- Multiple inheritance: Where one class can have more than one super class and inherit features from all parent classes.
- Multilevel inheritance : Where a subclass is inherited from another subclass. Hierarchical inheritance: Where one class serves as a superclass (base class) for more than one sub class.
- Hybrid inheritance: a mix of two or more of the above types of inheritance.
Object-Oriented Programming in C++ (4th Edition)
Object-Oriented Programming for Dummies