Question: Should destructors in the base class Person be declared virtual? Explain why or why not. [2 marks] Can we make a constructor virtual? Why or
- Should destructors in the base class Person be declared virtual? Explain why or why not. [2 marks]
- Can we make a constructor virtual? Why or why not? (Explain with reference to VPTR) . [1 mark]
- Can we make Person class as abstract class? If yes, how? If no, why? [1 mark]
- What happens if we do not make a constructor of an abstract class. Explain. [1 mark]
- Is is possible to make promote function as virtual? Can this class be made abstract? Justify your answer. [1 mark]
- Should we define a destructor of an abstract class? Justify your answer with proper reasoning. [1 mark]
- Why was there a need to define virtual functions? Explain an issue/trouble faced in inheritance that is only resolved by making functions virtual? [1 mark]
- OOP C++
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
