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

  1. Should destructors in the base class Person be declared virtual? Explain why or why not. [2 marks]
  2. Can we make a constructor virtual? Why or why not? (Explain with reference to VPTR) . [1 mark]
  3. Can we make Person class as abstract class? If yes, how? If no, why? [1 mark]
  4. What happens if we do not make a constructor of an abstract class. Explain. [1 mark]
  5. Is is possible to make promote function as virtual? Can this class be made abstract? Justify your answer. [1 mark]
  6. Should we define a destructor of an abstract class? Justify your answer with proper reasoning. [1 mark]
  7. 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]
  8. OOP C++

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!