Question: This practical task introduces you to inheritance, a mechanism in which one class acquires the features and behaviour of another class. The class whose features

This practical task introduces you to inheritance, a mechanism in which one class acquires the features and
behaviour of another class. The class whose features are inherited is known as a super class (or a base class
or a parent class). The class that inherits from the other class is known as a subclass (or a derived class, or
an extended class, or a child class). The subclass can add its own attributes and methods in addition to those
of the superclass. Inheritance supports the concept of reusability. That is, when we want to create a new
class and there is already a class that includes some of the code that we want, we can derive our new class
from the existing class. By doing this, we are reusing the attributes and methods of the existing class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!