Question: c++ You are given a class Marker. You need to define a new class MarkerOOP that inherits from Marker and additionally has an attribute int
c++
You are given a class Marker. You need to define a new class MarkerOOP
that inherits from Marker and additionally has an attribute int *marks and a
single public function with the signature void capMarks(int).
i. Write the C++ declaration for MarkerOOP that clearly shows the inheritance
from Marker. Make sure that you explicitly declare the default
constructor, correctly set access modifiers, and follow information hiding
policy with respect to the variable int *marks so that all set/get methods
are introduced if required.
[7 marks]
ii. Assume that in the previous part, Marker has an abstract method defined
as part of the class. Explain what this means for the MarkerOOP class?
[2 marks]
[Total for Question 8: 14 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
