Question: (a) What does the virtual keyword do in C++? [2 marks] 3 marks] 2 marks] (b) i. What is the key benefit of polymorphism? ii.

 (a) What does the virtual keyword do in C++? [2 marks]

(a) What does the virtual keyword do in C++? [2 marks] 3 marks] 2 marks] (b) i. What is the key benefit of polymorphism? ii. What are the main disadvantages of polymorphism? (c) How could you use pointers to objects to avoid the object slicing prob- lem? Briefly explain object slicing as part of your answer. 3 marks]

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!