Computer Science, asked by draaaaacula, 3 months ago

Implement the following class hierarchy.
TEACHER AUTHOR
SCHOLAR
1) Add appropriate data member in all the classes
a. Add name and age in both Teacher and Author classes
2) Add default and parameterized constructors and destructor in all the classes
3) Write appropriate getter, setter functions
4) In main program create object of scholar class and display all values inherited members from base classes and its own member. Also see the behavior and order in which constructors and destructors are called.
b) Modification & Extension
1) Add a common base class Person
2) Remove name and age data members from Teacher and Author classes and add these data
members in common base class Person
3) Also add constructor and destructor in Person class
4) Create object of Scholar class in main program. Display all data and see the behavior and order for constructors and destructors

Answers

Answered by malongjoseph64
0

Answer:

ok I understand but not now am too tired

Similar questions