SlideShare a Scribd company logo
MADE BY:
PREETI BAJARE
ROLL NO.:
5705
What is Inheritance ?
Inheritance is one of the important
feature of the OOP. Inheritance is the
method by which objects of one class
gets the properties of another class.
Advantages of Inheritance?
Sometimes we need to repeat the code or
we need repeat the whole class properties.
So It helps in various ways.
1.) It saves memory space.
2.) It saves time.
3.) It will remove frustration.
4.) It increases reliability of the code
5.) It saves the developing and testing
efforts.
Why we use Inheritance?
To increase the reusability of the
code and to make further usable for
another classes. We use the concept
of inheritance.
Types of Inheritance
1.) Single Inheritance
2.) Multiple Inheritance
3.) Multilevel Inheritance
3.) Hierarchical Inheritance
4.) Hybrid inheritance
 A derived class with only one base class.
A
B
 A derived class with several base classes.
A
C
B
 The mechanism of deriving a class from
another derived class.
A
C
B
Inheritance
Student
Test
Records
Result
Sports
Intermediate
base class
Derived
class
Base
class
The method of combining any two or more forms of
inheritance in single form is called hybrid inheritance.
 A derived class can be defined by specifying
its relationship with the base class in addition
to its own details.
class derived-class-name : visibility-mode base-class-name
{
………//
………// members of derived class
………//
};
It is the keyword that controls the visibility
and availability of inherited base class
members in the derived class. It can be either
private or protected or public.
It is the inheritance facilitated by private
visibility mode. In private inheritance, the
protected and public members of base
class become private members of the
derived class.
Private Inheritance:
It is the inheritance facilitated by public
visibility mode. In public inheritance, the
protected members of base class
become protected members of the
derived class and public members of the
base class become public members of
derived class.;
Public Inheritance:
It is the inheritance facilitated by
protected visibility mode. In
protected inheritance , the protected
and public members of base class
become protected members of the
derived class.
Protected Inheritance:
Inheritance

More Related Content

PPTX
Final presentation programming
PPT
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
PPTX
INHERITANCE-Oopc ppt-ta4
PPTX
Inheritance in c++ part1
PPT
Inheritance, Object Oriented Programming
PPTX
Inheritance in Object Oriented Programming
PPTX
Inheritance in OOPS
PPTX
Inheritance
Final presentation programming
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
INHERITANCE-Oopc ppt-ta4
Inheritance in c++ part1
Inheritance, Object Oriented Programming
Inheritance in Object Oriented Programming
Inheritance in OOPS
Inheritance

What's hot (18)

PPS
Inheritance
PPTX
C# Access modifiers
PPTX
Introduction to Inheritance
PPTX
Inheritance
PPTX
Single inheritance
PPT
Inheritance
PPT
Inheritance
PPT
Inheritance
PPTX
Inheritance,constructor,friend function
PDF
Inheritance
PPTX
Multiple inheritance in c++
PPTX
10 access control
PDF
OOP Inheritance
PPTX
Concept of OOPS with real life examples
PPT
friend function(c++)
PPTX
Access specifiers(modifiers) in java
PDF
Java - Inheritance Concepts
Inheritance
C# Access modifiers
Introduction to Inheritance
Inheritance
Single inheritance
Inheritance
Inheritance
Inheritance
Inheritance,constructor,friend function
Inheritance
Multiple inheritance in c++
10 access control
OOP Inheritance
Concept of OOPS with real life examples
friend function(c++)
Access specifiers(modifiers) in java
Java - Inheritance Concepts
Ad

Similar to Inheritance (20)

PPTX
Inheritance in oops
PDF
INHERITANCE
PPTX
Inheritance.pptx
PPTX
Inheritance
DOCX
oop database doc for studevsgdy fdsyn hdf
PDF
lecture 6.pdf
PPTX
B.sc CSIT 2nd semester C++ Unit5
PPT
Inheritance
PPTX
Inheritance
PDF
PPTX
INHERITANCES.pptx
PPT
Topic inheritance
ODP
PDF
PPTX
PPTX
Ritik (inheritance.cpp)
PPTX
OOPS-"INHERITANCE"
PPTX
PPTX
Inheritance
PPT
Inheritance.ppt
Inheritance in oops
INHERITANCE
Inheritance.pptx
Inheritance
oop database doc for studevsgdy fdsyn hdf
lecture 6.pdf
B.sc CSIT 2nd semester C++ Unit5
Inheritance
Inheritance
INHERITANCES.pptx
Topic inheritance
Ritik (inheritance.cpp)
OOPS-"INHERITANCE"
Inheritance
Inheritance.ppt
Ad

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Lesson notes of climatology university.
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Classroom Observation Tools for Teachers
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Presentation on HIE in infants and its manifestations
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Microbial disease of the cardiovascular and lymphatic systems
STATICS OF THE RIGID BODIES Hibbelers.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
GDM (1) (1).pptx small presentation for students
A systematic review of self-coping strategies used by university students to ...
Lesson notes of climatology university.
Anesthesia in Laparoscopic Surgery in India
Module 4: Burden of Disease Tutorial Slides S2 2025
Abdominal Access Techniques with Prof. Dr. R K Mishra
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Classroom Observation Tools for Teachers
Final Presentation General Medicine 03-08-2024.pptx
Presentation on HIE in infants and its manifestations
Microbial diseases, their pathogenesis and prophylaxis
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape

Inheritance

  • 2. What is Inheritance ? Inheritance is one of the important feature of the OOP. Inheritance is the method by which objects of one class gets the properties of another class.
  • 3. Advantages of Inheritance? Sometimes we need to repeat the code or we need repeat the whole class properties. So It helps in various ways. 1.) It saves memory space. 2.) It saves time. 3.) It will remove frustration. 4.) It increases reliability of the code 5.) It saves the developing and testing efforts.
  • 4. Why we use Inheritance? To increase the reusability of the code and to make further usable for another classes. We use the concept of inheritance.
  • 5. Types of Inheritance 1.) Single Inheritance 2.) Multiple Inheritance 3.) Multilevel Inheritance 3.) Hierarchical Inheritance 4.) Hybrid inheritance
  • 6.  A derived class with only one base class. A B
  • 7.  A derived class with several base classes. A C B
  • 8.  The mechanism of deriving a class from another derived class. A C B
  • 10. Student Test Records Result Sports Intermediate base class Derived class Base class The method of combining any two or more forms of inheritance in single form is called hybrid inheritance.
  • 11.  A derived class can be defined by specifying its relationship with the base class in addition to its own details. class derived-class-name : visibility-mode base-class-name { ………// ………// members of derived class ………// };
  • 12. It is the keyword that controls the visibility and availability of inherited base class members in the derived class. It can be either private or protected or public.
  • 13. It is the inheritance facilitated by private visibility mode. In private inheritance, the protected and public members of base class become private members of the derived class. Private Inheritance:
  • 14. It is the inheritance facilitated by public visibility mode. In public inheritance, the protected members of base class become protected members of the derived class and public members of the base class become public members of derived class.; Public Inheritance:
  • 15. It is the inheritance facilitated by protected visibility mode. In protected inheritance , the protected and public members of base class become protected members of the derived class. Protected Inheritance: