Technology Consulting - by Slidesgo
Technology Consulting - by Slidesgo
IV
INHERITANCE
TeamMate
LULUWA
LUBNA
Multilevel
Hybrid Inheritance
JUWERIYA Inheritance and and hierachial
Intro of multiple inheritance inheritance
inheritance and
single inheritance
INHERITANCE
MULTI-LEVEL HIERARICHIAL
INHERITANCE INHERITANCE
01 02 03 04
MULTIPLE HYBRID
INHERITANCE INHERITANCE
01
MULTI-LEVEL
INHERITANC
E
Syntax
MULTI-LEVEL
INHERITANCE
EXPLANATION
In the above program, there are two base class A and B from which
class C is inherited. Therefore, derived class C inherits all the public
members of A and B and retains their visibility. Here, we have
created
the object obj1 of derived class C.
How does multiple inheritance
differ from multilevel
inheritance?
Though but multiple and multilevel sounds like same but they
differ hugely in meaning. In multilevel inheritance, we have
multiple parent classes whereas in in multiple inheritance we
have multiple base classes.
JUWERIYA RAFI
LULUWA
MOHAMMED
LUBNA ZAINAB
THANK
YOU