Types of Inheritance
Inheritance mechanism may be categorized by :
1. Single
2. Multilevel
3. Multiple
4. Hierarchical
5. Hybrid
1. Single Inheritance :
The inheritance mechanism in which a new class is derived from only base class, called single inheritance.
2. Multilevel Inheritance :
The inheritance mechanism in which a new class is derived from another derived class called Multilevel Inheritance.
3. Multiple Inheritance : The inheritance mechanism by which a new class is derived from two or more class, called Multiple Inheritance.
4. Hierarchical Inheritance : The inheritance mechanism in which two or more new classes are derived from only one base class, called Hierarchical Inheritance.
5. Hybrid Inheritance : The inheritance mechanism in which derivation of a class involving more than one from of inheritance is called Hybrid Inheritance.
No comments :
Post a Comment