Definition inheritance
Concept Of Reuseablity:
C++ strongly supports the conepts of reuseability.The C++ classes can be reused in several ways.Once the class has bn written and tested ,it can be adopted by other programmers to suit their reuirements.This is basically done by creating a new classes , reusing the properities of the existing classes
Definition:
The mechanism of deriving a new class from the old class is called as Inheritance Or derivation.The old class is called as Base class. The new class is called as the derived class or sub class.
Derived class Properites:
The derived class inherits some or all of the traits from the base class.A class can also inherit the properites from more than one classes or from more than one level
C++ provides three visiblity modifier
1.Private
2.Public
3.Protected
Public is Inherited by all the classes
Protected is accessiable by the member of the function within its class ,it cannot be accessed outside the classes
Private is inherited only by the members of private class