0% found this document useful (0 votes)
5 views4 pages

Inheritance Types and Examples in C++

The document outlines various concepts and types of inheritance in programming, particularly in C++. It includes definitions, examples, and programming tasks related to single, multiple, multilevel, hierarchical, and hybrid inheritance, as well as visibility modes and abstract classes. Additionally, it provides instructions for implementing these concepts through coding exercises.

Uploaded by

pranavtomar001
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)
5 views4 pages

Inheritance Types and Examples in C++

The document outlines various concepts and types of inheritance in programming, particularly in C++. It includes definitions, examples, and programming tasks related to single, multiple, multilevel, hierarchical, and hybrid inheritance, as well as visibility modes and abstract classes. Additionally, it provides instructions for implementing these concepts through coding exercises.

Uploaded by

pranavtomar001
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-III

Extending classes using Inheritance

1. Define inheritance and enlist it's types. [2]


2. Describe multiple inheritance with suitable example. [4]
3. Write a program to implement single inheritance from following Figure
accept and display the data for one table .[4]

4. Explain different visibility modes used in inheritance. [4]


5. Illustrate the hierarchical inheritance. [4]
6. Explain the concept of virtual base class with it's general syntax & suitable
example. [8]
7. State 'different visibility modes used in inheritance. [2]
8. What is an abstract base class ? [2]
9. Write a program that illustrates multiple inheritance. [4]
10. Explain virtual base class in inheritance with suitable diagram. [4]
11. Explain single inheritance with program. [4]
12. Identify the type of inheritance shown in following Fig.. Implement it by
using suitable . member function. [8]

13. State different types of inheritance with diagram. [4]


14. Give the types of inheritance for following diagram: [2]
i) ii)

15. Write a program to show use of multilevel inheritance for following diagram
to calculate the gross salary. gs = bs + 0.5 * bs + 0.6 * bs; [4]

16. Write a program to show use of Single inheritance. [4]


17. Explain hybrid inheritance with example. [4]
18. Differentiate between multiple inheritance and multilevel inheritance. [4]
19. Explain various types of inheritance with example. [8]
20. State different types of inheritances and describe anyone. [4]
21. How protected access specifier is different from private. [4]
22. What is Virtual Base class? Describe with suitable diagram. [2]
23. Write a program to implement single inheritance from following data.
Accept and display data for one object.
Data : Base class name = Furniture
Data member = material, price
Derived class name = Table
Data-member = height, surface - area. [4]
24. How hierarchical inheritance is achieved, explain with example. [4]
25. List types of inheritance. [2]
26. State and explain various visibility modifiers in inheritance. [4]
27. Write a program to illustrate multiple inheritance. Write suitable data
members and member functions. [4]
28. What is hybrid inheritance ? Give one example. [4]
29. Implement inheritance using following figure with member functions for
reading and printing data. [8]

30. What is an abstract base class. [2]


31. What is inheritance? Why inheritance used in C++? [2]
32. State different visibility modes used in inheritance. [2]
33. Explain multiple inheritance with suitable example. [4]
34. What is virtual base class? Explain with suitable example. [4]
35. Write a program to implement inheritance as shown in Figure given below
assume suitable member functions. [4]

36. Write a program showing use of single inheritance. [4]


37. Explain various types of inheritance with example. [8]
38. Draw and explain multiple inheritance with suitable example. [2]
39. Write a program that illustrates multilevel inheritance. [4]
40. Explain abstract class with suitable example. [4]
41. Write a program to implement inheritance as shown in Fig. Assume suitable
member function." [4]

42. Write a program to implement inheritance as shown in Fig. Assume suitable


member function. [8]

43. State different types of visibility modes in inheritance. [2]


44. What is multiple inheritance? What is multilevel inheritance? What is
difference between them? [2]
45. What is" base class? What is derived class? Give example. [4]
46. What is virtual base class? Explain with example. [4]
47. Explain hybrid inheritance with example. [4]
48. What is inheritance? What is use of inheritance? Explain. [4]

You might also like