+1 vote
in Class 12 by kratos

Write a short note on inheritance.

1 Answer

+2 votes
by kratos
 
Best answer

Inheritance enables us to create new classes that reuse, extend, and modify the behavior that is defined in other classes. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. A derived class can have only one direct base class. Inheritance is transitive. When we define a class to derive from another class, the derived class implicitly gains all the members of the base class, except for its constructors and destructors.

...