Question: Question 7: (CLO2- 8 marks] a) should destructors in the base class Person be declared virtual? Explain why or why not. [2 marks] b) Can

 Question 7: (CLO2- 8 marks] a) should destructors in the base

Question 7: (CLO2- 8 marks] a) should destructors in the base class Person be declared virtual? Explain why or why not. [2 marks] b) Can we make a constructor virtual? Why or why not? (Explain with reference to VPTR). [1 mark] c) Can we make Person class as abstract class? If yes, how? If no, why? [1 mark] d) What happens if we do not make a constructor of an abstract class. Explain. [1 mark] e) Is is possible to make 'promote' function as virtual? Can this class be made abstract? Justify your answer. [1 mark] f) should we define a destructor of an abstract class? Justify your answer with proper reasoning. [1 mark] g) 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]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!