SlideShare una empresa de Scribd logo
1 de 11
INHERITANCE
What is Inheritance?

Inheritance is concept of obtaining
 the properties of object from one
  class to object of another class.
    It’s been mainly used for its
             Reusability.
Types of Inheritance

There are six types of Inheritance
1.   Single Inheritance
2.   Multiple Inheritance
3.   Multilevel Inheritance
4.   Hierarchical Inheritance
5.   Hybrid Inheritance
6.   Multipart Inheritance
Single Inheritance
                A     Base Class




                B      Derived Class



  •It contains one Base Class and one
             Derived Class.
•Contents of the Base Class is Inherited
         into the Derived Class.
Multiple Inheritance
Base Class      A           B              Base Class




                      C
                                Derived Class



      •Two or More Base Class is Inherited
          into a Single Derived Class.
Hierarchical Inheritance
                           A        Base Class




Derived Class 1      B             C             Derived Class 2




             •Hierarchical Inheritance is straight
              opposite to Multiple Inheritance.
           •One Base Class is Inherited into two or
                     more Derived Class.
Multi Level Inheritance
                A       Base Class


                B      Derived Class
                C      Base Class


               C1         Base Class  Derived Class



 •One of the different form of Inheritance.
  •Here, Base Class is Inherited by another
Derived Class and Derived Class changes into
Base Class and then Inherited into a Derived
                    Class.
Hybrid Inheritance
                   A         Base Class                   Derived Class


                                                              D1
                   B        Derived Class
Base Class         C

                                            C1
                 Derived Class
                                            D    Base Class

                  •One of the complex type of Inheritance.
             •Here Base Class is Inherited to Derived Class and
             the Derived Class changes to Base Class and once
                        again Inherited to Derived Class.
               •It is a combination of Single Inheritance and
                            Multi Level Inheritance.
Multipart Inheritance
                                 Base Class
                          A



               C                         D
Derived                                       Derived
Class                                         Class


                           Y

                       Derived
                       Class

          •The Diagram itself explains that it is
           possible to have a single Base Class
          and that Base Class is Inherited into a
          collection of Derived Class in any Part
Representation of Symbol

             Base Class


             Derived Class


             Base Class Inherited to Derived
             Class

             Derived Class Inherited to Base
             Class
Slides Created by

                         Srinath
Thanks for watching the Slide

Más contenido relacionado

La actualidad más candente

Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++Vishal Patil
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++Vineeta Garg
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaRahulAnanda1
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator OverloadingNilesh Dalvi
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...cprogrammings
 
Abstract class in c++
Abstract class in c++Abstract class in c++
Abstract class in c++Sujan Mia
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Raj Naik
 
Composition in OOP
Composition in OOPComposition in OOP
Composition in OOPHuba Akhtar
 
Polymorphism In c++
Polymorphism In c++Polymorphism In c++
Polymorphism In c++Vishesh Jha
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPTPooja Jaiswal
 
Constructor and Destructor in c++
Constructor  and Destructor in c++Constructor  and Destructor in c++
Constructor and Destructor in c++aleenaguen
 

La actualidad más candente (20)

Templates in C++
Templates in C++Templates in C++
Templates in C++
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Getters_And_Setters.pptx
Getters_And_Setters.pptxGetters_And_Setters.pptx
Getters_And_Setters.pptx
 
C# Inheritance
C# InheritanceC# Inheritance
C# Inheritance
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
inheritance
inheritanceinheritance
inheritance
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
 
Abstract class in c++
Abstract class in c++Abstract class in c++
Abstract class in c++
 
Java- Nested Classes
Java- Nested ClassesJava- Nested Classes
Java- Nested Classes
 
Class 10
Class 10Class 10
Class 10
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
07. Virtual Functions
07. Virtual Functions07. Virtual Functions
07. Virtual Functions
 
Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive
 
Composition in OOP
Composition in OOPComposition in OOP
Composition in OOP
 
Polymorphism In c++
Polymorphism In c++Polymorphism In c++
Polymorphism In c++
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
 
Type casting
Type castingType casting
Type casting
 
Constructor and Destructor in c++
Constructor  and Destructor in c++Constructor  and Destructor in c++
Constructor and Destructor in c++
 

Destacado

Destacado (20)

Inheritance
InheritanceInheritance
Inheritance
 
inheritance c++
inheritance c++inheritance c++
inheritance c++
 
Inheritance
InheritanceInheritance
Inheritance
 
Hybrid Inheritance in C++
Hybrid Inheritance in C++Hybrid Inheritance in C++
Hybrid Inheritance in C++
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance in C++
Inheritance in C++Inheritance in C++
Inheritance in C++
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance in oops
Inheritance in oopsInheritance in oops
Inheritance in oops
 
Fields of digital image processing slides
Fields of digital image processing slidesFields of digital image processing slides
Fields of digital image processing slides
 
Constructors & destructors
Constructors & destructorsConstructors & destructors
Constructors & destructors
 
Java applets
Java appletsJava applets
Java applets
 
C++ Inheritance
C++ InheritanceC++ Inheritance
C++ Inheritance
 
Locah Project Show and Tell
Locah Project Show and TellLocah Project Show and Tell
Locah Project Show and Tell
 
How would you implement multiple inheritance in java
How would you implement multiple inheritance in javaHow would you implement multiple inheritance in java
How would you implement multiple inheritance in java
 
Lecture4
Lecture4Lecture4
Lecture4
 
Inheritance & Polymorphism - 1
Inheritance & Polymorphism - 1Inheritance & Polymorphism - 1
Inheritance & Polymorphism - 1
 
abitha-pds inheritance presentation
abitha-pds inheritance presentationabitha-pds inheritance presentation
abitha-pds inheritance presentation
 
Chapter 04 inheritance
Chapter 04 inheritanceChapter 04 inheritance
Chapter 04 inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 

Más de Srinath Dhayalamoorthy

இசை கருவிகளின் வகைகள் Spring instruments
இசை கருவிகளின் வகைகள்   Spring instrumentsஇசை கருவிகளின் வகைகள்   Spring instruments
இசை கருவிகளின் வகைகள் Spring instrumentsSrinath Dhayalamoorthy
 
இசை கருவிகளின் வகைகள் - Wind instruments
இசை கருவிகளின் வகைகள் - Wind instrumentsஇசை கருவிகளின் வகைகள் - Wind instruments
இசை கருவிகளின் வகைகள் - Wind instrumentsSrinath Dhayalamoorthy
 
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்Srinath Dhayalamoorthy
 
IPC Section Part - 2 | Import Insurance to know | Offence and Punishment
IPC Section Part - 2 | Import Insurance to know | Offence and PunishmentIPC Section Part - 2 | Import Insurance to know | Offence and Punishment
IPC Section Part - 2 | Import Insurance to know | Offence and PunishmentSrinath Dhayalamoorthy
 

Más de Srinath Dhayalamoorthy (9)

இசை கருவிகளின் வகைகள் Spring instruments
இசை கருவிகளின் வகைகள்   Spring instrumentsஇசை கருவிகளின் வகைகள்   Spring instruments
இசை கருவிகளின் வகைகள் Spring instruments
 
இசை கருவிகளின் வகைகள் - Wind instruments
இசை கருவிகளின் வகைகள் - Wind instrumentsஇசை கருவிகளின் வகைகள் - Wind instruments
இசை கருவிகளின் வகைகள் - Wind instruments
 
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்
இசை கருவிகளின் வகைகள் - தோலிசைக் கருவிகள்
 
Best weapon to tackle covid 19
Best weapon to tackle covid 19Best weapon to tackle covid 19
Best weapon to tackle covid 19
 
How coronavirus spread in the World?
How coronavirus spread in the World? How coronavirus spread in the World?
How coronavirus spread in the World?
 
IPC Section Part - 2 | Import Insurance to know | Offence and Punishment
IPC Section Part - 2 | Import Insurance to know | Offence and PunishmentIPC Section Part - 2 | Import Insurance to know | Offence and Punishment
IPC Section Part - 2 | Import Insurance to know | Offence and Punishment
 
IPC sections | Indian Sarais Act 1887
IPC sections | Indian Sarais Act 1887IPC sections | Indian Sarais Act 1887
IPC sections | Indian Sarais Act 1887
 
Unix
UnixUnix
Unix
 
Servers
ServersServers
Servers
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Inheritance

  • 2. What is Inheritance? Inheritance is concept of obtaining the properties of object from one class to object of another class. It’s been mainly used for its Reusability.
  • 3. Types of Inheritance There are six types of Inheritance 1. Single Inheritance 2. Multiple Inheritance 3. Multilevel Inheritance 4. Hierarchical Inheritance 5. Hybrid Inheritance 6. Multipart Inheritance
  • 4. Single Inheritance A Base Class B Derived Class •It contains one Base Class and one Derived Class. •Contents of the Base Class is Inherited into the Derived Class.
  • 5. Multiple Inheritance Base Class A B Base Class C Derived Class •Two or More Base Class is Inherited into a Single Derived Class.
  • 6. Hierarchical Inheritance A Base Class Derived Class 1 B C Derived Class 2 •Hierarchical Inheritance is straight opposite to Multiple Inheritance. •One Base Class is Inherited into two or more Derived Class.
  • 7. Multi Level Inheritance A Base Class B Derived Class C Base Class C1 Base Class  Derived Class •One of the different form of Inheritance. •Here, Base Class is Inherited by another Derived Class and Derived Class changes into Base Class and then Inherited into a Derived Class.
  • 8. Hybrid Inheritance A Base Class Derived Class D1 B Derived Class Base Class C C1 Derived Class D Base Class •One of the complex type of Inheritance. •Here Base Class is Inherited to Derived Class and the Derived Class changes to Base Class and once again Inherited to Derived Class. •It is a combination of Single Inheritance and Multi Level Inheritance.
  • 9. Multipart Inheritance Base Class A C D Derived Derived Class Class Y Derived Class •The Diagram itself explains that it is possible to have a single Base Class and that Base Class is Inherited into a collection of Derived Class in any Part
  • 10. Representation of Symbol Base Class Derived Class Base Class Inherited to Derived Class Derived Class Inherited to Base Class
  • 11. Slides Created by Srinath Thanks for watching the Slide