0% found this document useful (0 votes)
11 views1 page

Unit-17 Cs

The document discusses key concepts of inheritance in object-oriented programming, defining inheritance, base classes, and derived classes. It explains the differences between multilevel and multiple inheritance, as well as the distinctions between public and private visibility modes. The derived class is highlighted as a 'power packed class' due to its ability to inherit and enhance functionality from the base class.

Uploaded by

kervinjeeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Unit-17 Cs

The document discusses key concepts of inheritance in object-oriented programming, defining inheritance, base classes, and derived classes. It explains the differences between multilevel and multiple inheritance, as well as the distinctions between public and private visibility modes. The derived class is highlighted as a 'power packed class' due to its ability to inherit and enhance functionality from the base class.

Uploaded by

kervinjeeva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like