What is inheritance?
Inheritance is a technique which is used to derive or build
new classes from existing class. A class may be derive from one or more
classes. The new classes are called derived
class or sub class and existing
class is called base class or super class. The derived class inherit
the property of its base including its data members and member methods. It can
also add its own member method and data members.
BENEFITS:-
·
Data in existing class can be modify easily.
·
Object oriented hierarchy can be built.
No comments:
Post a Comment