C++ Module-3 QB
C++ Module-3 QB
Sl. Questions
No.
1. Define Inheritance. Explain how derived classes are defined with a suitable example.
2. Discuss about different types of Inheritance.
3. Briefly explain how the private member can be Inherited.
4. Interpret single Inheritance with a suitable example.
5. Define hybrid Inheritance. Illustrate it with an example.
6. Briefly explain the concept of virtual base class.
7. Interpret how the protected members of the base class can be Inherited.
8. Explain protected access specifier with an example.
9. Discuss how the public members of the base class be Inherited.
10.Illustrate how the constructors are invoked in Inheritance.
11.Write a C++ program to read and display employee details using the concept of Inheritance.
12.Briefly explain the concept of multiple Inheritance with suitable example.
13.Demonstrate how the ambiguities of multiple Inheritance can be resolved with an example.
14.Demonstrate how the derived classes are defined with a suitable example.
15.Explain the effects of private access specifier on visibility of base class and derived class.
16.Explain base class and derived class with an example.
17.Discuss about multilevel inheritance in detail.
18.Explain the various visibility inheritance modes with an example.
19.Explain the diamond problem of inheritance in C++ with an example.
20.Construct a C++ program to create a base class Book and derive two new classes Engineering
book and Novel. Use suitable member and member functions to illustrate hierarchical
inheritance.
21.Interpret the differences between public and private inheritance.
22.Construct a C++ program to create a base class ‘Student’ and derive two new classes, ‘Test’
and ‘Marks’ respectively. Class Student stores the roll number, class Test stores the marks
obtained in two subjects and class Result contains the total marks obtained in the test. Use
suitable member functions to display the roll number, two subject marks and total marks.
23.Explain the order of invocation of constructors and destructors in inheritance with a suitable
example.
24.Illustrate single inheritance for private and public derivation.