Different forms of inheritance
* Single inheritance
* Multiple inheritances
* Multilevel inheritance
* Hierarchical inheritance
* Hybrid inheritance
* Multipath inheritance.
Single inheritance
In single inheritance, we have a single base class and a single derived class. The single derived class inherits the properties of the single base class.
Class “A” is the base class and class “B” is the derived class. The class “B” inherits the properties of the class “A”.
Multiple inheritances
In multiple inheritances, we have two or more base classes and a single derived class. The single derived class inherits the properties of all the base classes.
Classes “A” ,”B” and “C” are the base classes and class “D” is the derived class. Class “D” inherits the properties of the classes “A” , “B” and “C”.