SlideShare a Scribd company logo
International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019
Available at www.ijsred.com
ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 144
“Inheritance in C++ Programming Language”
Prof. Vishal Mehtra
Assistant Professor,
Electrical Department
Bharati Vidhyapeeth Deemed University
College of Engineering, Pune, India
vvmehtre@bvucoep.edu.in
Prachi Gupta
Electrical Department
Bharati Vidhyapeeth Deemed University
College of Engineering, Pune, India
prachi.gupta7878@gmail.com
Abstract
The objective of this review paper is to
review concept of inheritance in C++
Programming Language. The review paper
begins upon the survey of C++ OOP’s
concept like inheritance, programming &
language technical concepts using
examples to provide the reader’s a feel for
the language. Inheritance plays an
important rule for code reusability. C++ is
a general-purpose programming language
with an influence towards system
programming that supports efficient low-
levelcomputations, dataabstraction, Object
Oriented Programmingand generic
programming.
Keywords
C++,OOP’s,Inheritance, Software reuse.
Introduction
C++ is an Object-Oriented development of
C with classes [6], member functions,
operators, overloading, constructors etc.
It’s the first language taught to
undergraduates at CUED. C++ strongly
supports the concept of reusability. [1]
Object- Oriented Programming is a
practical and useful programming strategy
that encourages modular design and
software reuse.[7] Object- Oriented
language make the promises of reduced
maintenance, code, reusability, improved
reliability, flexibility and easier
maintenance through better data
encapsulation.[4] To attain these gains,
Object -Oriented language introduces the
concepts objects, classes, data abstraction,
encapsulation, Inheritance and
polymorphism.
Inheritance in C++
In C++ inheritance is a form of software
reusability in which a new class acquires
all the properties (the data members) and
behaviors (the member function) of
existing class in hierarchy. [8]
It is a process of creating new classes from
existing. The existing class is known as
base class and newly created class is called
derived class. [1]
Example- A child inherits the traits of
his/her parents.
Derived class
A class that does the inheriting is called as
derived class, sub-class or child class.
RESEARCH ARTICLE OPEN ACCESS
International Journal of Scientific Research and Engineering Development
ISSN : 2581-7175
Base class
A class that is inherited is referred to as
base class, superclass or parent class.
Access Specifiers [9]
TypesofInheritance
• Single Inheritance
A derived class with only one base class is
called single inheritance. [2]
• Multilevel Inheritance
A derived class with one base class and
that base class is derived a
class of another is called multilevel
inheritance.
Scientific Research and Engineering Development-– Volume 2 Issue 6
Available at www.ijsred.com
©IJSRED: All Rights are Reserved
A class that is inherited is referred to as a
class, superclass or parent class.[5]
A derived class with only one base class is
A derived class with one base class and
a
class of another is called multilevel
• Multiple Inheritance
A derived class with multiple b
called multiple inheritance. [3]
• Hierarchical Inheritance
Multiple derived classes with same base
class is called hierarchical Inheritance.
• Hybrid Inheritance
Combination of multiple and hierarchical
inheritance is called hybrid inheritance.
Volume 2 Issue 6, Nov- Dec 2019
www.ijsred.com
Page 145
a
A derived class with multiple base class is
[3]
Multiple derived classes with same base
class is called hierarchical Inheritance.
ombination of multiple and hierarchical
inheritance.
International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019
Available at www.ijsred.com
ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 146
• Multipath Inheritance
A derived class with two base classes and
these two base classes has a common base
class is called multipath inheritance.
Comparison of C and C++
Applications of Inheritance in C++
• It saves memory space and time.
• It will remove frustration, improve the
performance and increase reliability of
code.
• It is used to correlate two or more
classes.
• Code reusability.
Limitation of Inheritance in C++
• Overuse of inheritance in a software can
make it more complex.
• Multiple inheritance can create ambiguity
between attributes and operation and can
increase the likelihood of errors.
Acknowledgement
We would like to express our special
thanks of gratefulness to Dr. D.S Bankar,
Head, Department of Electrical
Engineering for their able guidance and
support for completing my review paper. I
would also like to thank the faculty
members of the department of Electrical
Engineering who helped us with extended
support.
Conclusion
In this paper we discuss about inheritance
concept, its types, various application and
limitations in C++ language. We also
discuss about base class and derived class.
In C++ programming language,
inheritance plays an important part for
code reusability and maintainability and
demonstrate how inheritance and code
reusability had a connection.
C++ is better than C programming
language due to availability of reusability
of code (inheritance) in C++ which makes
C++ programs to takes less space, time
and achieve higher accuracy than C.
In C++ we can define class by inheritance
and maintain a class correctly and easily.
Data security is very high in C++ language
due to access specifiers.[9]
C C++
• C is a structural
programming
language.
• C++ is both
structural and object-
oriented programming
language.
• C doesn’t support
object – oriented
features like
inheritance, data
abstraction etc.
• C++ supports object
– oriented features
like inheritance, data
abstraction etc.
• Code reusability is
not possible so it
acquires more space
and time.
• Code reusability is
possible so it acquires
less space and time.
• Data security is
very less.
• Data security is very
high.
International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019
Available at www.ijsred.com
ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 147
Reference
[1]. E Balagurusamy, “Object oriented
Programming with C++”, 6th Edition,
New Delhi: Tata McGraw-Hill Publishing
Company Limited.
[2]. Yashavant Kanetkar, “Test your C++
Skills”, 1st Edition, BPB Publication.
[3]. S. Geetha, D. Jeya Mala, “Object
Oriented Analysis and Design Using
UML”, 1st Edition, McGraw-Hill
Education.
[4]. Bjarne Stroustrup, The C++
Programming Language, Person
Publication.
[5]Mischelle Yaiser,“Object -Oriented
Programming concepts in C++”
[6] Abrahams G Ranade, “An
Introduction to programming through
C++”.
[7] Alan Snyder, “Encapsulation and
Inheritance in Object-Oriented
Programming Languages”
[8] [IJARCSMS, 2013] “Research Paper
on A Study on Inheritance Using Object-
Oriented Programming with C++”.
(http://www.ijarcsms.com/docs/paper/volu
me1/issue2/V1I2-0005.pdf)
[9] [Edureka, 2019] Article on, ‘Everything
You NEED to Know About Inheritance in
C++’’’
(https://www.edureka.co/blog/inheritance-in-
cpp)

More Related Content

Similar to Inheritance in C++ Programming Language

What is inheritance How is it useful Discuss 3 advantages and disa.docx
 What is inheritance How is it useful  Discuss 3 advantages and disa.docx What is inheritance How is it useful  Discuss 3 advantages and disa.docx
What is inheritance How is it useful Discuss 3 advantages and disa.docx
ajoy21
 
L03 Software Design
L03 Software DesignL03 Software Design
L03 Software Design
Ólafur Andri Ragnarsson
 
Teaching Bioinformatics
Teaching BioinformaticsTeaching Bioinformatics
Teaching Bioinformatics
guest705f7e
 
An Open Source Framework for Teaching BIoinformatics
An Open Source Framework for Teaching BIoinformaticsAn Open Source Framework for Teaching BIoinformatics
An Open Source Framework for Teaching BIoinformatics
bosc
 
Survey on Natural Language Generation
Survey on Natural Language GenerationSurvey on Natural Language Generation
Survey on Natural Language Generation
ijtsrd
 
gayathiri
gayathirigayathiri
gayathiri
Gayathri S
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
KAUSHAL KUMAR JHA
 
Cs8383 oop lab manual-2019
Cs8383 oop lab manual-2019Cs8383 oop lab manual-2019
Cs8383 oop lab manual-2019
Kayathri Devi D
 
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
Neil Chue Hong
 
Rohit Ahlawat
Rohit AhlawatRohit Ahlawat
Rohit Ahlawat
ahlawatrohit
 
Integration of java ee applications on c – based implementations
Integration of java ee applications on c – based implementationsIntegration of java ee applications on c – based implementations
Integration of java ee applications on c – based implementations
Alexander Decker
 
1669609053088_oops_final.pptx
1669609053088_oops_final.pptx1669609053088_oops_final.pptx
1669609053088_oops_final.pptx
PandeeswariKannan
 
Cloud Computing Security From Sngle to multi Clouds Full Documentaion
Cloud Computing Security From Sngle to multi Clouds Full DocumentaionCloud Computing Security From Sngle to multi Clouds Full Documentaion
Cloud Computing Security From Sngle to multi Clouds Full Documentaion
Vamshi Chowdary
 
company resume
company resumecompany resume
company resume
SATISH CHAVAN
 
c++session 1.pptx
c++session 1.pptxc++session 1.pptx
c++session 1.pptx
PadmaN24
 
C++ with student management system project
C++ with student management system projectC++ with student management system project
C++ with student management system project
Kratik Khandelwal
 
653 656
653 656653 656
mitra_resume-2
mitra_resume-2mitra_resume-2
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova
 
Raushan_Resume1
Raushan_Resume1Raushan_Resume1
Raushan_Resume1
Raushan Kumar
 

Similar to Inheritance in C++ Programming Language (20)

What is inheritance How is it useful Discuss 3 advantages and disa.docx
 What is inheritance How is it useful  Discuss 3 advantages and disa.docx What is inheritance How is it useful  Discuss 3 advantages and disa.docx
What is inheritance How is it useful Discuss 3 advantages and disa.docx
 
L03 Software Design
L03 Software DesignL03 Software Design
L03 Software Design
 
Teaching Bioinformatics
Teaching BioinformaticsTeaching Bioinformatics
Teaching Bioinformatics
 
An Open Source Framework for Teaching BIoinformatics
An Open Source Framework for Teaching BIoinformaticsAn Open Source Framework for Teaching BIoinformatics
An Open Source Framework for Teaching BIoinformatics
 
Survey on Natural Language Generation
Survey on Natural Language GenerationSurvey on Natural Language Generation
Survey on Natural Language Generation
 
gayathiri
gayathirigayathiri
gayathiri
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
Cs8383 oop lab manual-2019
Cs8383 oop lab manual-2019Cs8383 oop lab manual-2019
Cs8383 oop lab manual-2019
 
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
Doing Science Properly in the Digital Age: Software Skills for Free-Range Res...
 
Rohit Ahlawat
Rohit AhlawatRohit Ahlawat
Rohit Ahlawat
 
Integration of java ee applications on c – based implementations
Integration of java ee applications on c – based implementationsIntegration of java ee applications on c – based implementations
Integration of java ee applications on c – based implementations
 
1669609053088_oops_final.pptx
1669609053088_oops_final.pptx1669609053088_oops_final.pptx
1669609053088_oops_final.pptx
 
Cloud Computing Security From Sngle to multi Clouds Full Documentaion
Cloud Computing Security From Sngle to multi Clouds Full DocumentaionCloud Computing Security From Sngle to multi Clouds Full Documentaion
Cloud Computing Security From Sngle to multi Clouds Full Documentaion
 
company resume
company resumecompany resume
company resume
 
c++session 1.pptx
c++session 1.pptxc++session 1.pptx
c++session 1.pptx
 
C++ with student management system project
C++ with student management system projectC++ with student management system project
C++ with student management system project
 
653 656
653 656653 656
653 656
 
mitra_resume-2
mitra_resume-2mitra_resume-2
mitra_resume-2
 
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
Dilnoza Bobokalonova Resume | Embedded Systems Engineering | Backend Software...
 
Raushan_Resume1
Raushan_Resume1Raushan_Resume1
Raushan_Resume1
 

More from IJSRED

IJSRED-V3I6P13
IJSRED-V3I6P13IJSRED-V3I6P13
IJSRED-V3I6P13
IJSRED
 
School Bus Tracking and Security System
School Bus Tracking and Security SystemSchool Bus Tracking and Security System
School Bus Tracking and Security System
IJSRED
 
BigBasket encashing the Demonetisation: A big opportunity
BigBasket encashing the Demonetisation: A big opportunityBigBasket encashing the Demonetisation: A big opportunity
BigBasket encashing the Demonetisation: A big opportunity
IJSRED
 
Quantitative and Qualitative Analysis of Plant Leaf Disease
Quantitative and Qualitative Analysis of Plant Leaf DiseaseQuantitative and Qualitative Analysis of Plant Leaf Disease
Quantitative and Qualitative Analysis of Plant Leaf Disease
IJSRED
 
DC Fast Charger and Battery Management System for Electric Vehicles
DC Fast Charger and Battery Management System for Electric VehiclesDC Fast Charger and Battery Management System for Electric Vehicles
DC Fast Charger and Battery Management System for Electric Vehicles
IJSRED
 
Growth Path Followed by France
Growth Path Followed by FranceGrowth Path Followed by France
Growth Path Followed by France
IJSRED
 
Acquisition System
Acquisition SystemAcquisition System
Acquisition System
IJSRED
 
Parallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MPParallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MP
IJSRED
 
Study of Phenotypic Plasticity of Fruits of Luffa Acutangula Var. Amara
Study of Phenotypic Plasticity of  Fruits of Luffa Acutangula Var. AmaraStudy of Phenotypic Plasticity of  Fruits of Luffa Acutangula Var. Amara
Study of Phenotypic Plasticity of Fruits of Luffa Acutangula Var. Amara
IJSRED
 
Understanding Architecture of Internet of Things
Understanding Architecture of Internet of ThingsUnderstanding Architecture of Internet of Things
Understanding Architecture of Internet of Things
IJSRED
 
Smart shopping cart
Smart shopping cartSmart shopping cart
Smart shopping cart
IJSRED
 
An Emperical Study of Learning How Soft Skills is Essential for Management St...
An Emperical Study of Learning How Soft Skills is Essential for Management St...An Emperical Study of Learning How Soft Skills is Essential for Management St...
An Emperical Study of Learning How Soft Skills is Essential for Management St...
IJSRED
 
Smart Canteen Management
Smart Canteen ManagementSmart Canteen Management
Smart Canteen Management
IJSRED
 
Gandhian trusteeship and Economic Ethics
Gandhian trusteeship and Economic EthicsGandhian trusteeship and Economic Ethics
Gandhian trusteeship and Economic Ethics
IJSRED
 
Impacts of a New Spatial Variable on a Black Hole Metric Solution
Impacts of a New Spatial Variable on a Black Hole Metric SolutionImpacts of a New Spatial Variable on a Black Hole Metric Solution
Impacts of a New Spatial Variable on a Black Hole Metric Solution
IJSRED
 
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
IJSRED
 
Inginious Trafalgar Contrivition System
Inginious Trafalgar Contrivition SystemInginious Trafalgar Contrivition System
Inginious Trafalgar Contrivition System
IJSRED
 
Farmer's Analytical assistant
Farmer's Analytical assistantFarmer's Analytical assistant
Farmer's Analytical assistant
IJSRED
 
Functions of Forensic Engineering Investigator in India
Functions of Forensic Engineering Investigator in IndiaFunctions of Forensic Engineering Investigator in India
Functions of Forensic Engineering Investigator in India
IJSRED
 
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
IJSRED
 

More from IJSRED (20)

IJSRED-V3I6P13
IJSRED-V3I6P13IJSRED-V3I6P13
IJSRED-V3I6P13
 
School Bus Tracking and Security System
School Bus Tracking and Security SystemSchool Bus Tracking and Security System
School Bus Tracking and Security System
 
BigBasket encashing the Demonetisation: A big opportunity
BigBasket encashing the Demonetisation: A big opportunityBigBasket encashing the Demonetisation: A big opportunity
BigBasket encashing the Demonetisation: A big opportunity
 
Quantitative and Qualitative Analysis of Plant Leaf Disease
Quantitative and Qualitative Analysis of Plant Leaf DiseaseQuantitative and Qualitative Analysis of Plant Leaf Disease
Quantitative and Qualitative Analysis of Plant Leaf Disease
 
DC Fast Charger and Battery Management System for Electric Vehicles
DC Fast Charger and Battery Management System for Electric VehiclesDC Fast Charger and Battery Management System for Electric Vehicles
DC Fast Charger and Battery Management System for Electric Vehicles
 
Growth Path Followed by France
Growth Path Followed by FranceGrowth Path Followed by France
Growth Path Followed by France
 
Acquisition System
Acquisition SystemAcquisition System
Acquisition System
 
Parallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MPParallelization of Graceful Labeling Using Open MP
Parallelization of Graceful Labeling Using Open MP
 
Study of Phenotypic Plasticity of Fruits of Luffa Acutangula Var. Amara
Study of Phenotypic Plasticity of  Fruits of Luffa Acutangula Var. AmaraStudy of Phenotypic Plasticity of  Fruits of Luffa Acutangula Var. Amara
Study of Phenotypic Plasticity of Fruits of Luffa Acutangula Var. Amara
 
Understanding Architecture of Internet of Things
Understanding Architecture of Internet of ThingsUnderstanding Architecture of Internet of Things
Understanding Architecture of Internet of Things
 
Smart shopping cart
Smart shopping cartSmart shopping cart
Smart shopping cart
 
An Emperical Study of Learning How Soft Skills is Essential for Management St...
An Emperical Study of Learning How Soft Skills is Essential for Management St...An Emperical Study of Learning How Soft Skills is Essential for Management St...
An Emperical Study of Learning How Soft Skills is Essential for Management St...
 
Smart Canteen Management
Smart Canteen ManagementSmart Canteen Management
Smart Canteen Management
 
Gandhian trusteeship and Economic Ethics
Gandhian trusteeship and Economic EthicsGandhian trusteeship and Economic Ethics
Gandhian trusteeship and Economic Ethics
 
Impacts of a New Spatial Variable on a Black Hole Metric Solution
Impacts of a New Spatial Variable on a Black Hole Metric SolutionImpacts of a New Spatial Variable on a Black Hole Metric Solution
Impacts of a New Spatial Variable on a Black Hole Metric Solution
 
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
A Study to Assess the Effectiveness of Planned Teaching Programme on Knowledg...
 
Inginious Trafalgar Contrivition System
Inginious Trafalgar Contrivition SystemInginious Trafalgar Contrivition System
Inginious Trafalgar Contrivition System
 
Farmer's Analytical assistant
Farmer's Analytical assistantFarmer's Analytical assistant
Farmer's Analytical assistant
 
Functions of Forensic Engineering Investigator in India
Functions of Forensic Engineering Investigator in IndiaFunctions of Forensic Engineering Investigator in India
Functions of Forensic Engineering Investigator in India
 
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
Participation Politique Feminine En Competition Électorale Au Congo-Kinshasa....
 

Recently uploaded

Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 

Recently uploaded (20)

Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 

Inheritance in C++ Programming Language

  • 1. International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019 Available at www.ijsred.com ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 144 “Inheritance in C++ Programming Language” Prof. Vishal Mehtra Assistant Professor, Electrical Department Bharati Vidhyapeeth Deemed University College of Engineering, Pune, India vvmehtre@bvucoep.edu.in Prachi Gupta Electrical Department Bharati Vidhyapeeth Deemed University College of Engineering, Pune, India prachi.gupta7878@gmail.com Abstract The objective of this review paper is to review concept of inheritance in C++ Programming Language. The review paper begins upon the survey of C++ OOP’s concept like inheritance, programming & language technical concepts using examples to provide the reader’s a feel for the language. Inheritance plays an important rule for code reusability. C++ is a general-purpose programming language with an influence towards system programming that supports efficient low- levelcomputations, dataabstraction, Object Oriented Programmingand generic programming. Keywords C++,OOP’s,Inheritance, Software reuse. Introduction C++ is an Object-Oriented development of C with classes [6], member functions, operators, overloading, constructors etc. It’s the first language taught to undergraduates at CUED. C++ strongly supports the concept of reusability. [1] Object- Oriented Programming is a practical and useful programming strategy that encourages modular design and software reuse.[7] Object- Oriented language make the promises of reduced maintenance, code, reusability, improved reliability, flexibility and easier maintenance through better data encapsulation.[4] To attain these gains, Object -Oriented language introduces the concepts objects, classes, data abstraction, encapsulation, Inheritance and polymorphism. Inheritance in C++ In C++ inheritance is a form of software reusability in which a new class acquires all the properties (the data members) and behaviors (the member function) of existing class in hierarchy. [8] It is a process of creating new classes from existing. The existing class is known as base class and newly created class is called derived class. [1] Example- A child inherits the traits of his/her parents. Derived class A class that does the inheriting is called as derived class, sub-class or child class. RESEARCH ARTICLE OPEN ACCESS
  • 2. International Journal of Scientific Research and Engineering Development ISSN : 2581-7175 Base class A class that is inherited is referred to as base class, superclass or parent class. Access Specifiers [9] TypesofInheritance • Single Inheritance A derived class with only one base class is called single inheritance. [2] • Multilevel Inheritance A derived class with one base class and that base class is derived a class of another is called multilevel inheritance. Scientific Research and Engineering Development-– Volume 2 Issue 6 Available at www.ijsred.com ©IJSRED: All Rights are Reserved A class that is inherited is referred to as a class, superclass or parent class.[5] A derived class with only one base class is A derived class with one base class and a class of another is called multilevel • Multiple Inheritance A derived class with multiple b called multiple inheritance. [3] • Hierarchical Inheritance Multiple derived classes with same base class is called hierarchical Inheritance. • Hybrid Inheritance Combination of multiple and hierarchical inheritance is called hybrid inheritance. Volume 2 Issue 6, Nov- Dec 2019 www.ijsred.com Page 145 a A derived class with multiple base class is [3] Multiple derived classes with same base class is called hierarchical Inheritance. ombination of multiple and hierarchical inheritance.
  • 3. International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019 Available at www.ijsred.com ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 146 • Multipath Inheritance A derived class with two base classes and these two base classes has a common base class is called multipath inheritance. Comparison of C and C++ Applications of Inheritance in C++ • It saves memory space and time. • It will remove frustration, improve the performance and increase reliability of code. • It is used to correlate two or more classes. • Code reusability. Limitation of Inheritance in C++ • Overuse of inheritance in a software can make it more complex. • Multiple inheritance can create ambiguity between attributes and operation and can increase the likelihood of errors. Acknowledgement We would like to express our special thanks of gratefulness to Dr. D.S Bankar, Head, Department of Electrical Engineering for their able guidance and support for completing my review paper. I would also like to thank the faculty members of the department of Electrical Engineering who helped us with extended support. Conclusion In this paper we discuss about inheritance concept, its types, various application and limitations in C++ language. We also discuss about base class and derived class. In C++ programming language, inheritance plays an important part for code reusability and maintainability and demonstrate how inheritance and code reusability had a connection. C++ is better than C programming language due to availability of reusability of code (inheritance) in C++ which makes C++ programs to takes less space, time and achieve higher accuracy than C. In C++ we can define class by inheritance and maintain a class correctly and easily. Data security is very high in C++ language due to access specifiers.[9] C C++ • C is a structural programming language. • C++ is both structural and object- oriented programming language. • C doesn’t support object – oriented features like inheritance, data abstraction etc. • C++ supports object – oriented features like inheritance, data abstraction etc. • Code reusability is not possible so it acquires more space and time. • Code reusability is possible so it acquires less space and time. • Data security is very less. • Data security is very high.
  • 4. International Journal of Scientific Research and Engineering Development-– Volume 2 Issue 6, Nov- Dec 2019 Available at www.ijsred.com ISSN : 2581-7175 ©IJSRED: All Rights are Reserved Page 147 Reference [1]. E Balagurusamy, “Object oriented Programming with C++”, 6th Edition, New Delhi: Tata McGraw-Hill Publishing Company Limited. [2]. Yashavant Kanetkar, “Test your C++ Skills”, 1st Edition, BPB Publication. [3]. S. Geetha, D. Jeya Mala, “Object Oriented Analysis and Design Using UML”, 1st Edition, McGraw-Hill Education. [4]. Bjarne Stroustrup, The C++ Programming Language, Person Publication. [5]Mischelle Yaiser,“Object -Oriented Programming concepts in C++” [6] Abrahams G Ranade, “An Introduction to programming through C++”. [7] Alan Snyder, “Encapsulation and Inheritance in Object-Oriented Programming Languages” [8] [IJARCSMS, 2013] “Research Paper on A Study on Inheritance Using Object- Oriented Programming with C++”. (http://www.ijarcsms.com/docs/paper/volu me1/issue2/V1I2-0005.pdf) [9] [Edureka, 2019] Article on, ‘Everything You NEED to Know About Inheritance in C++’’’ (https://www.edureka.co/blog/inheritance-in- cpp)