SlideShare a Scribd company logo
1 of 12
INHERITANCE
B.Sc.IT
325
Ankit Surati
What is Inheritance?
• The method by which we can derive a new
class from an old called as INHERITANCE or
DERIVATION.
• The old class referred as BASE CLASS and the
new generated class is called as DERIVED
CLASS or SUBCLASS.
Advantages
• Reusability
• Reliability
• Save time and memory
• Enhancement
• Classification
• Industry used
Disadvantage
• Member of the base class becomes private
member of derived class but cannot be
accessed by parts of your program that are
not members of either the base of derived
class even though base class is inherited as
private by derived one.
Visibility mode
Types of inheritance
1.Single Inheritance
• The single inheritance is having only one base
class and only one derived class.
• The single child Inherits the property from
single parent class is nothing but SINGLE
INHERITANCE.
• The child classes use
some or all properties from
parent class.
2.Multiple Inheritance
The new derived class can adapt
Various properties from various
Base classes so that the class is
Very powerful.
The derived child class is the
Combination of various base class.
3.Multilevel Inheritance
• Suppose one class is derived
from its parent class
& same class acts as base of
another class.
That class is called as
INTERMEDIATE BASE CLASS.
4.Hierarchical Inheritance
• The dictionary meaning of hierarchy is as,
system of grades of status or authority
ranked one above the other.
• The classification of objects into
various sections. Those sections
are nothing but classesdifferent
classes.
5.Hybrid Inheritance
• Sometimes when more than one type of
Inheritance is used in the
functionality of program
then it is called as HYBRID
INHERITANCE.
6.Multi-path Inheritance
• When multiple, multilevel
and hybrid inheritance
invoked altogether,
then it is known as
multi-path inheritance

More Related Content

Viewers also liked

Internship%20Presentation%20RJY-5
Internship%20Presentation%20RJY-5Internship%20Presentation%20RJY-5
Internship%20Presentation%20RJY-5Ryan Young
 
Instructional Design Plan
Instructional Design PlanInstructional Design Plan
Instructional Design PlanRainie Themer
 
Circus Conservatory of America Library Presentation
Circus Conservatory of America Library PresentationCircus Conservatory of America Library Presentation
Circus Conservatory of America Library PresentationRainie Themer
 
Gun control fact pack july 4, 2015
Gun control fact pack   july 4, 2015Gun control fact pack   july 4, 2015
Gun control fact pack july 4, 2015SavvyCitizen
 
Data entry india bpo - Outsource Data Entry India
Data entry india bpo - Outsource Data Entry IndiaData entry india bpo - Outsource Data Entry India
Data entry india bpo - Outsource Data Entry IndiaCamila Anderson
 
The growth of the sustainability agenda and the role of facilities management
The growth of the sustainability agenda and the role of facilities managementThe growth of the sustainability agenda and the role of facilities management
The growth of the sustainability agenda and the role of facilities managementFM EXPO
 

Viewers also liked (8)

Internship%20Presentation%20RJY-5
Internship%20Presentation%20RJY-5Internship%20Presentation%20RJY-5
Internship%20Presentation%20RJY-5
 
Instructional Design Plan
Instructional Design PlanInstructional Design Plan
Instructional Design Plan
 
Circus Conservatory of America Library Presentation
Circus Conservatory of America Library PresentationCircus Conservatory of America Library Presentation
Circus Conservatory of America Library Presentation
 
Gun control fact pack july 4, 2015
Gun control fact pack   july 4, 2015Gun control fact pack   july 4, 2015
Gun control fact pack july 4, 2015
 
Shanks, Neil CV
Shanks, Neil CVShanks, Neil CV
Shanks, Neil CV
 
CV - Luttrell, Mary Beth
CV - Luttrell, Mary BethCV - Luttrell, Mary Beth
CV - Luttrell, Mary Beth
 
Data entry india bpo - Outsource Data Entry India
Data entry india bpo - Outsource Data Entry IndiaData entry india bpo - Outsource Data Entry India
Data entry india bpo - Outsource Data Entry India
 
The growth of the sustainability agenda and the role of facilities management
The growth of the sustainability agenda and the role of facilities managementThe growth of the sustainability agenda and the role of facilities management
The growth of the sustainability agenda and the role of facilities management
 

Similar to OOPS-"INHERITANCE"

Similar to OOPS-"INHERITANCE" (20)

Topic inheritance
Topic  inheritanceTopic  inheritance
Topic inheritance
 
Object Oriented Programming - 7.1. Inheritance
Object Oriented Programming - 7.1. InheritanceObject Oriented Programming - 7.1. Inheritance
Object Oriented Programming - 7.1. Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Java(inheritance)
Java(inheritance)Java(inheritance)
Java(inheritance)
 
INHERITANCES.pptx
INHERITANCES.pptxINHERITANCES.pptx
INHERITANCES.pptx
 
Inheritance.pptx
Inheritance.pptxInheritance.pptx
Inheritance.pptx
 
inheritance-16031525566nbhij56604452.pdf
inheritance-16031525566nbhij56604452.pdfinheritance-16031525566nbhij56604452.pdf
inheritance-16031525566nbhij56604452.pdf
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Oops (inheritance&interface)
Oops (inheritance&interface)Oops (inheritance&interface)
Oops (inheritance&interface)
 
Inheritance
InheritanceInheritance
Inheritance
 
27c
27c27c
27c
 
27csharp
27csharp27csharp
27csharp
 
Java introduction
Java introductionJava introduction
Java introduction
 
Inheritance
Inheritance Inheritance
Inheritance
 
INHERITANCE-Oopc ppt-ta4
INHERITANCE-Oopc ppt-ta4INHERITANCE-Oopc ppt-ta4
INHERITANCE-Oopc ppt-ta4
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Mca 2nd sem u-3 inheritance
Mca 2nd  sem u-3 inheritanceMca 2nd  sem u-3 inheritance
Mca 2nd sem u-3 inheritance
 
inheritance
   inheritance   inheritance
inheritance
 
Bca 2nd sem u-3 inheritance
Bca 2nd sem u-3 inheritanceBca 2nd sem u-3 inheritance
Bca 2nd sem u-3 inheritance
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

OOPS-"INHERITANCE"

  • 2. What is Inheritance? • The method by which we can derive a new class from an old called as INHERITANCE or DERIVATION. • The old class referred as BASE CLASS and the new generated class is called as DERIVED CLASS or SUBCLASS.
  • 3. Advantages • Reusability • Reliability • Save time and memory • Enhancement • Classification • Industry used
  • 4. Disadvantage • Member of the base class becomes private member of derived class but cannot be accessed by parts of your program that are not members of either the base of derived class even though base class is inherited as private by derived one.
  • 7. 1.Single Inheritance • The single inheritance is having only one base class and only one derived class. • The single child Inherits the property from single parent class is nothing but SINGLE INHERITANCE. • The child classes use some or all properties from parent class.
  • 8. 2.Multiple Inheritance The new derived class can adapt Various properties from various Base classes so that the class is Very powerful. The derived child class is the Combination of various base class.
  • 9. 3.Multilevel Inheritance • Suppose one class is derived from its parent class & same class acts as base of another class. That class is called as INTERMEDIATE BASE CLASS.
  • 10. 4.Hierarchical Inheritance • The dictionary meaning of hierarchy is as, system of grades of status or authority ranked one above the other. • The classification of objects into various sections. Those sections are nothing but classesdifferent classes.
  • 11. 5.Hybrid Inheritance • Sometimes when more than one type of Inheritance is used in the functionality of program then it is called as HYBRID INHERITANCE.
  • 12. 6.Multi-path Inheritance • When multiple, multilevel and hybrid inheritance invoked altogether, then it is known as multi-path inheritance