Unit -16
Very Short Answer (2 Mark)
1. What is inheritance?
The mechanism of deriving new class from an existing class is called inheritance.
2. What is a base class?
A class that is used as the basis for creating a new class is called a super class or
base class.
3. Why derived class is called power packed class?
The derived class inherits all the properties of the base class.
It is a power packed class, as it can add additional attributes and methods
and thus enhance its functionality.
4. In what multilevel and multiple inheritance differ though both
contains many base class? Multilevel Inheritance:
In multilevel inheritance, the constructors will be executed in the order of inheritance.
Multiple Inheritance:
If there are multiple base classes, then it starts executing from the left most base class.
5. What is the difference between public and private visibility mode?
public private
When a base class is inherited with public When a base class is inherited with privat
visibility mode , the protected members of the visibility mode the public and protecte
base class will be inherited as protected members of the base class become ‘private
members of the derived class and the public members of the derived class
members of the base class will be inherited as
public members of the derived class.