Professional Documents
Culture Documents
• Single inheritance
• Multilevel inheritance
• Multiple inheritance
• Hierarchical inheritance
• Hybrid inheritance
Single Inheritance
• In single inheritance there exists single base class and single
derived class. Single inheritance enables a derived class to
inherit properties and behavior from a single parent class.
A B
Base Class Derived Class
Output :
Multilevel Inheritance
C
Derived Class
Output :
Multiple Inheritance
Multiple inheritance is a feature of some object-
oriented computer programming languages in which
a derived class can inherit characteristics and
features from more than one base class.
A B C
Base Class Base Class Base Class
D
Derived Class
Output :
Hierarchical Inheritance
A
Base Class
B C
Derived Class Derived Class
Output :
Hybrid Inheritance
B
Intermediate C
Base-Class Base Class
D
Derived Class
Multilple Inheritance
Output :
Reference:
1. Jafrin Madam’s class note.
2. http://www.tutorialspoint.com/
3. http://www.cplusplus.com/
Thanks
Everyone
Any Questions