Biology for Computer Engineers Course Handout.pptx
INHERITANCE-Oopc ppt-ta4
1. INFORMATION TECHNOLOGY
Object oriented programming with c++(2140705)
Inheritance
TA4
Name & Enrollment no:
Ashutosh Makwana - 141130116003
Meet Gandhi – 141130116014
Divyesh Mangroliya – 141130116033
Kishan Modiya – 141130116038
Jay Patel - 141130116055
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. How Inheritance can be achieved?
• In the inheritance there will be a parent child
relationship .
• There is a class called in which all the
properties are defined and generally, it is
referred as a base class.
• There is also an another class in which is
derived from the existing one are known as a
derived class.
6. How to define derived class?
A derived class can be defined by specifying its relationship with the base class in
addition to its own details.
syntax:
Class derived-class-name: visibility-mode base-class-name
{
member of derived class
};