SlideShare a Scribd company logo
1 of 14
TOPIC- InheritanceTOPIC- Inheritance
Inheritance process of creating aInheritance process of creating a
new class from an existing class.new class from an existing class.
• The existing class that is beingThe existing class that is being
inherited is called the base classinherited is called the base class
and new class that inherits theand new class that inherits the
functionality is called derivedfunctionality is called derived
class.class.
SINGLE
INHERITANCE :-
• The derived class inherits some or all
of the traits of the base class .A
class can also inherit properties from
more than one class or from more
than one level .A derived class can
only one base case is called singel
inheritance .
MULTI LEVEL
INHERITANCE :-
• In this type of inheritance, there are
number of levels and it is used in
that cases where we want to use all
properties in number of levels
according to the requirement . It is
not unusual that a class is derived
from another derived class .
MULTIPLE
INHERITANCE:-
• A class can inherit the attributes of two
or more classes . This is known as multiple
iheritance . Multiple inheritance allows us
to join the features of a number of exiting
classes as a starting point for defining new
classes . It is like a child inheriting the
physical features of one parent and the
intellectuality of other .
HIERARCHICAL
INHERITANCE :-
• The form in which more then one classes
are derived from single base class is know
as hierarchical inheritance . Hierarchical
inheritance is useful in the cases where
there is some hierarchical content in
program . We can cast a number of
problems into hierarchical manner , and
therefore will use hierarchical inheritance
there .
HYBRID
INHERITANCE :-
• In this type of inheritance , we can
have combination of two or more
types . It is when you want to use two
or more type of inheritance in a
single program . Thus , hybrid
iheritance is that from of
inheritance in which we use two or
more than two types of inheritance .
PUBLIC,PRIVATE AND
PROTECTED INHERITANCE
• Inheritance is a process of creating a new class from
an existing class. When a class is derived from an
existing class, all the members of base class are
automatically inherited in the derived class. However,
it is also possible to restrict access to data members
and member functions of the base class in the
derived class.
• The purpuse of restricting access to member of the
base class is to ensure the integrity of the object by
controlling how other classes and parts of the
program(main()) interact
with it.
• In order to achieve this, the base class
is inherited through public, private and
protected access specifiers.these
specifies control the access of
inherited members of the base class in
the derived class and other parts of the
programmain().
Private:
priv_base;
Protected:
prot_base;
Public:
pub_base;

More Related Content

What's hot (19)

Unit 4
Unit 4Unit 4
Unit 4
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Packages
PackagesPackages
Packages
 
Lec 1.9 oop
Lec 1.9 oopLec 1.9 oop
Lec 1.9 oop
 
Java inheritance
Java inheritanceJava inheritance
Java inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Lec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented ProgrammingLec 1.10 Object Oriented Programming
Lec 1.10 Object Oriented Programming
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
 
Inheritance
InheritanceInheritance
Inheritance
 
Swift classes
Swift classesSwift classes
Swift classes
 
Inheritance ppt
Inheritance pptInheritance ppt
Inheritance ppt
 
Inheritance
InheritanceInheritance
Inheritance
 
Introduction to Object-Oriented Concepts and Java
Introduction to Object-Oriented Concepts and Java Introduction to Object-Oriented Concepts and Java
Introduction to Object-Oriented Concepts and Java
 
Object oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented conceptsObject oriented programming 3 object oriented concepts
Object oriented programming 3 object oriented concepts
 
Lec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented ProgrammingLec 1.8 Object Oriented Programming
Lec 1.8 Object Oriented Programming
 
Class Members Access/Visibility Guide (Checklist)
Class Members Access/Visibility Guide (Checklist)Class Members Access/Visibility Guide (Checklist)
Class Members Access/Visibility Guide (Checklist)
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Inheritance in Java
Inheritance in JavaInheritance in Java
Inheritance in Java
 

Viewers also liked

Esquema bullying
Esquema bullyingEsquema bullying
Esquema bullyingLaura Reis
 
Cookie Rookie Training 2011
Cookie Rookie Training 2011Cookie Rookie Training 2011
Cookie Rookie Training 2011Girl Scouts
 
Courseware microsoft outlook 2010
Courseware microsoft outlook 2010Courseware microsoft outlook 2010
Courseware microsoft outlook 2010Mutd Ph
 
Esquema homoparentalidade
Esquema homoparentalidadeEsquema homoparentalidade
Esquema homoparentalidadeLaura Reis
 
Esquema educação sexual da pessoa com deficiencia
Esquema   educação sexual da pessoa com deficienciaEsquema   educação sexual da pessoa com deficiencia
Esquema educação sexual da pessoa com deficienciaLaura Reis
 
Camp Coleman Facilities Tour
Camp Coleman Facilities TourCamp Coleman Facilities Tour
Camp Coleman Facilities TourGirl Scouts
 
Sesión 1.2. aislamiento - exposiciones ocupacionales
Sesión 1.2.   aislamiento - exposiciones ocupacionalesSesión 1.2.   aislamiento - exposiciones ocupacionales
Sesión 1.2. aislamiento - exposiciones ocupacionalesHarrison Sandoval Castillo
 
Diário de leitura a descoberta da sexualidade infantil 08.12.15
Diário de leitura a descoberta da sexualidade infantil 08.12.15Diário de leitura a descoberta da sexualidade infantil 08.12.15
Diário de leitura a descoberta da sexualidade infantil 08.12.15Laura Reis
 
Sesión 1.1. bioseguridad - higiene de manos - uso de epp
Sesión 1.1.   bioseguridad - higiene de manos - uso de eppSesión 1.1.   bioseguridad - higiene de manos - uso de epp
Sesión 1.1. bioseguridad - higiene de manos - uso de eppHarrison Sandoval Castillo
 
Sound Branding- Out with the old, In with the new, V3
Sound Branding- Out with the old, In with the new, V3Sound Branding- Out with the old, In with the new, V3
Sound Branding- Out with the old, In with the new, V3Andres Jordan
 
New Logo Launch
New Logo LaunchNew Logo Launch
New Logo Launchcpack
 
Sesión 1.4. manejo de residuos - limpieza hospitalaria
Sesión 1.4.   manejo de residuos - limpieza hospitalariaSesión 1.4.   manejo de residuos - limpieza hospitalaria
Sesión 1.4. manejo de residuos - limpieza hospitalariaHarrison Sandoval Castillo
 
Docencia Universitaria
Docencia UniversitariaDocencia Universitaria
Docencia Universitariaglemp
 
介紹聯合報educoco社群學習平台(3/7發表會簡報)
介紹聯合報educoco社群學習平台(3/7發表會簡報)介紹聯合報educoco社群學習平台(3/7發表會簡報)
介紹聯合報educoco社群學習平台(3/7發表會簡報)Steven Chen
 
Educoco使用手冊 v.1
Educoco使用手冊 v.1Educoco使用手冊 v.1
Educoco使用手冊 v.1Steven Chen
 
Presentacion en power point
Presentacion en power pointPresentacion en power point
Presentacion en power pointluis munoz
 

Viewers also liked (19)

Esquema bullying
Esquema bullyingEsquema bullying
Esquema bullying
 
Cookie Rookie Training 2011
Cookie Rookie Training 2011Cookie Rookie Training 2011
Cookie Rookie Training 2011
 
Courseware microsoft outlook 2010
Courseware microsoft outlook 2010Courseware microsoft outlook 2010
Courseware microsoft outlook 2010
 
Esquema homoparentalidade
Esquema homoparentalidadeEsquema homoparentalidade
Esquema homoparentalidade
 
Rock music
Rock musicRock music
Rock music
 
Esquema educação sexual da pessoa com deficiencia
Esquema   educação sexual da pessoa com deficienciaEsquema   educação sexual da pessoa com deficiencia
Esquema educação sexual da pessoa com deficiencia
 
Camp Coleman Facilities Tour
Camp Coleman Facilities TourCamp Coleman Facilities Tour
Camp Coleman Facilities Tour
 
Sesión 1.2. aislamiento - exposiciones ocupacionales
Sesión 1.2.   aislamiento - exposiciones ocupacionalesSesión 1.2.   aislamiento - exposiciones ocupacionales
Sesión 1.2. aislamiento - exposiciones ocupacionales
 
Diário de leitura a descoberta da sexualidade infantil 08.12.15
Diário de leitura a descoberta da sexualidade infantil 08.12.15Diário de leitura a descoberta da sexualidade infantil 08.12.15
Diário de leitura a descoberta da sexualidade infantil 08.12.15
 
Sesión 1.1. bioseguridad - higiene de manos - uso de epp
Sesión 1.1.   bioseguridad - higiene de manos - uso de eppSesión 1.1.   bioseguridad - higiene de manos - uso de epp
Sesión 1.1. bioseguridad - higiene de manos - uso de epp
 
Sound Branding- Out with the old, In with the new, V3
Sound Branding- Out with the old, In with the new, V3Sound Branding- Out with the old, In with the new, V3
Sound Branding- Out with the old, In with the new, V3
 
New Logo Launch
New Logo LaunchNew Logo Launch
New Logo Launch
 
Sesión 1.4. manejo de residuos - limpieza hospitalaria
Sesión 1.4.   manejo de residuos - limpieza hospitalariaSesión 1.4.   manejo de residuos - limpieza hospitalaria
Sesión 1.4. manejo de residuos - limpieza hospitalaria
 
Sesión 1.3. prevención de iaas
Sesión 1.3.   prevención de iaasSesión 1.3.   prevención de iaas
Sesión 1.3. prevención de iaas
 
Exec Summ, Aug 2013
Exec Summ, Aug 2013Exec Summ, Aug 2013
Exec Summ, Aug 2013
 
Docencia Universitaria
Docencia UniversitariaDocencia Universitaria
Docencia Universitaria
 
介紹聯合報educoco社群學習平台(3/7發表會簡報)
介紹聯合報educoco社群學習平台(3/7發表會簡報)介紹聯合報educoco社群學習平台(3/7發表會簡報)
介紹聯合報educoco社群學習平台(3/7發表會簡報)
 
Educoco使用手冊 v.1
Educoco使用手冊 v.1Educoco使用手冊 v.1
Educoco使用手冊 v.1
 
Presentacion en power point
Presentacion en power pointPresentacion en power point
Presentacion en power point
 

Similar to Topic inheritance

Similar to Topic inheritance (20)

Ayan Das_25300121057.pptx
Ayan Das_25300121057.pptxAyan Das_25300121057.pptx
Ayan Das_25300121057.pptx
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
 
4th_class.pdf
4th_class.pdf4th_class.pdf
4th_class.pdf
 
full defination of final opp.pptx
full defination of final opp.pptxfull defination of final opp.pptx
full defination of final opp.pptx
 
Java(inheritance)
Java(inheritance)Java(inheritance)
Java(inheritance)
 
Oops
OopsOops
Oops
 
OOPS Characteristics (With Examples in PHP)
OOPS Characteristics (With Examples in PHP)OOPS Characteristics (With Examples in PHP)
OOPS Characteristics (With Examples in PHP)
 
Inheritance in oop
Inheritance in oopInheritance in oop
Inheritance in oop
 
Multiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptxMultiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptx
 
Java chapter 5
Java chapter 5Java chapter 5
Java chapter 5
 
Inheritance
Inheritance Inheritance
Inheritance
 
Object Oriented Programming - 7.1. Inheritance
Object Oriented Programming - 7.1. InheritanceObject Oriented Programming - 7.1. Inheritance
Object Oriented Programming - 7.1. Inheritance
 
lecture 6.pdf
lecture 6.pdflecture 6.pdf
lecture 6.pdf
 
Inheritance in OOPs with java
Inheritance in OOPs with javaInheritance in OOPs with java
Inheritance in OOPs with java
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
Object oriented programming new syllabus presentation
Object oriented programming new syllabus presentationObject oriented programming new syllabus presentation
Object oriented programming new syllabus presentation
 
PPT Lecture-1.4.pptx
PPT Lecture-1.4.pptxPPT Lecture-1.4.pptx
PPT Lecture-1.4.pptx
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

Topic inheritance

  • 1. TOPIC- InheritanceTOPIC- Inheritance Inheritance process of creating aInheritance process of creating a new class from an existing class.new class from an existing class. • The existing class that is beingThe existing class that is being inherited is called the base classinherited is called the base class and new class that inherits theand new class that inherits the functionality is called derivedfunctionality is called derived class.class.
  • 2. SINGLE INHERITANCE :- • The derived class inherits some or all of the traits of the base class .A class can also inherit properties from more than one class or from more than one level .A derived class can only one base case is called singel inheritance .
  • 3.
  • 4. MULTI LEVEL INHERITANCE :- • In this type of inheritance, there are number of levels and it is used in that cases where we want to use all properties in number of levels according to the requirement . It is not unusual that a class is derived from another derived class .
  • 5.
  • 6. MULTIPLE INHERITANCE:- • A class can inherit the attributes of two or more classes . This is known as multiple iheritance . Multiple inheritance allows us to join the features of a number of exiting classes as a starting point for defining new classes . It is like a child inheriting the physical features of one parent and the intellectuality of other .
  • 7.
  • 8. HIERARCHICAL INHERITANCE :- • The form in which more then one classes are derived from single base class is know as hierarchical inheritance . Hierarchical inheritance is useful in the cases where there is some hierarchical content in program . We can cast a number of problems into hierarchical manner , and therefore will use hierarchical inheritance there .
  • 9.
  • 10. HYBRID INHERITANCE :- • In this type of inheritance , we can have combination of two or more types . It is when you want to use two or more type of inheritance in a single program . Thus , hybrid iheritance is that from of inheritance in which we use two or more than two types of inheritance .
  • 11.
  • 12. PUBLIC,PRIVATE AND PROTECTED INHERITANCE • Inheritance is a process of creating a new class from an existing class. When a class is derived from an existing class, all the members of base class are automatically inherited in the derived class. However, it is also possible to restrict access to data members and member functions of the base class in the derived class. • The purpuse of restricting access to member of the base class is to ensure the integrity of the object by controlling how other classes and parts of the program(main()) interact with it.
  • 13. • In order to achieve this, the base class is inherited through public, private and protected access specifiers.these specifies control the access of inherited members of the base class in the derived class and other parts of the programmain().