Inheritance
Inheritance
Galangque, MSCA
email: cherrymae.galangque@g.msuiit.edu.ph
Computer Engineering Program, DEET
College of Engineering and Technology
Mindanao State University - Iligan Institute of Technology
▪ Inheritance
is one of the feature of Object Oriented Programming
System(OOPs)that allows the child class to acquire the properties (the data
members) and functionality (the member functions) of parent class.
▪ What is child class?
A class that inherits another class is known as child class, it is also known as
derived class or subclass.
▪ What is parent class?
The class that is being inherited by other class is known as parent class, super class
or base class.
▪ Syntax of Inheritance
class parent_class {
//Body of parent class
};
Calling a different constructor of a base class is possible, using the same syntax used to
initialize member variables in the initialization list: