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]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3b7576a65a_21566f3b75702518.jpg)
(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
Get step-by-step solutions from verified subject matter experts
