Inheritance Extending Classes: Different Forms of Inheritance

Get unlimited access to the best preparation resource for UGC : Get detailed illustrated notes covering entire syllabus: point-by-point for high retention.

Download PDF of This Page (Size: 427K)

Image shows type of Inheritance

Image Shows Type of Inheritance

Different Forms of Inheritance

  • The mechanism of deriving a new class from an old one is called inheritance (or derivation).

  • The old class is referred to as the base class and new one is called the derived class.

  • There are various forms of inheritance:

Image of Different Forms of Inheritance

Image of Different Forms of Inheritance

Single inheritance A derived class with only one base class is called single inheritance.

Image of Single inheritance

Image of Single Inheritance

Multiple inheritance A derived class with several base classes is called multiple inheritance.

Image of Multiple inheritance

Image of Multiple Inheritance

Multilevel inheritance The mechanism of deriving a class from another derived class is called multilevel inheritance.

Image of Multilevel inheritance

Image of Multilevel Inheritance

Hierarchical inheritance One class may be inherited by more than one classes. This process is known as hierarchical inheritance.

Image of Hierarchical inheritance

Image of Hierarchical Inheritance

Hybrid inheritance It is a combination of hierarchical and multiple inheritance.

Image of Hybrid inheritance

Image of Hybrid Inheritance

Developed by: