Inheritance is a feature of object-oriented programming that allows you to develop a class once, and then reuse that code over and over as the basis of new classes. Inheritance enables you to create new classes that reuse, extend, and modify the functionality defined in existing classes.
The class that inherits the functionality is called a derived class, and the class whose functionality is inherited is called a base class. A derived class inherits all the functionality of the base class and can also define additional features that make it different from the base class.
Inheritance aids in the reuse of code.
The following picture shows an example of inherance.
Click to enlarge.
