2. What is Inheritance?
• The method by which we can derive a new
class from an old called as INHERITANCE or
DERIVATION.
• The old class referred as BASE CLASS and the
new generated class is called as DERIVED
CLASS or SUBCLASS.
4. Disadvantage
• Member of the base class becomes private
member of derived class but cannot be
accessed by parts of your program that are
not members of either the base of derived
class even though base class is inherited as
private by derived one.
7. 1.Single Inheritance
• The single inheritance is having only one base
class and only one derived class.
• The single child Inherits the property from
single parent class is nothing but SINGLE
INHERITANCE.
• The child classes use
some or all properties from
parent class.
8. 2.Multiple Inheritance
The new derived class can adapt
Various properties from various
Base classes so that the class is
Very powerful.
The derived child class is the
Combination of various base class.
9. 3.Multilevel Inheritance
• Suppose one class is derived
from its parent class
& same class acts as base of
another class.
That class is called as
INTERMEDIATE BASE CLASS.
10. 4.Hierarchical Inheritance
• The dictionary meaning of hierarchy is as,
system of grades of status or authority
ranked one above the other.
• The classification of objects into
various sections. Those sections
are nothing but classesdifferent
classes.
11. 5.Hybrid Inheritance
• Sometimes when more than one type of
Inheritance is used in the
functionality of program
then it is called as HYBRID
INHERITANCE.
12. 6.Multi-path Inheritance
• When multiple, multilevel
and hybrid inheritance
invoked altogether,
then it is known as
multi-path inheritance