PRESENTED BY
Ms. V.VENNILA., MCA.,M.Phil.,
Asst.Prof of Information Technology,
Bon Secours College for Women,
Thanjavur
 The technique of driving a new class from an old
class is called inheritance.

The old class is referred to as base class and the
new class is referred to as derived class or sub
class.
Single Inheritance.
Multiple Inheritance.
Hierarchical Inheritance.
Multilevel Inheritance.
Hybrid/Virtual Inheritance.
 In Single inheritance there is only one base
class and one derived class.
SYNTAX:
Class derived class : Public base class;
Example:
A
B
 When one derived class is inherited from more
than one base class is called Multiple
inheritance.
Example:
A B
C
 In this type of inheritance a derived class is
created from another derived class.
Example:
A
B
C
 In this type of inheritance more than one
derived class is inherited from a single base
class.
Example: A
B C
D E F G
 Hybrid inheritance is implemented by
combining more than one type of inheritance.
Example:
A
B C
D
E F

INHERITANCE

  • 1.
    PRESENTED BY Ms. V.VENNILA.,MCA.,M.Phil., Asst.Prof of Information Technology, Bon Secours College for Women, Thanjavur
  • 2.
     The techniqueof driving a new class from an old class is called inheritance.  The old class is referred to as base class and the new class is referred to as derived class or sub class.
  • 3.
    Single Inheritance. Multiple Inheritance. HierarchicalInheritance. Multilevel Inheritance. Hybrid/Virtual Inheritance.
  • 4.
     In Singleinheritance there is only one base class and one derived class. SYNTAX: Class derived class : Public base class; Example: A B
  • 5.
     When onederived class is inherited from more than one base class is called Multiple inheritance. Example: A B C
  • 6.
     In thistype of inheritance a derived class is created from another derived class. Example: A B C
  • 7.
     In thistype of inheritance more than one derived class is inherited from a single base class. Example: A B C D E F G
  • 8.
     Hybrid inheritanceis implemented by combining more than one type of inheritance. Example: A B C D E F