is an important feature of object oriented programming used for code
reusability. It is a process of creating new classes called derived classes,
from the existing or base classes. Inheritance allows us to inherit all the
code (except declared as private) of one class to another class. The class to
be inherited is called base class or parent class and the class which inherits
the other class is called derived class or child class. The derived class is a
power packed class, as it can add additional attributes and methods and thus
enhance its functionality.