The class Chevrolet inherits from the class Automobile. Both have implemented a function called DownShift(). Suppose carPtr is declared as: Automobile *carPtr;
The carPtr object can point to both a Chevrolet or an Automobile. We want the call carPtr -> DownShift() to call the right version of DownShift based on what carPtr points to. We must:
a) declare DownShift virtual in class Chevrolet
b) declare DownShift virtual in class Automobile
c) make the inheritance public
d) make the inheritance private
I think the answers are "a & b".
If it's only one side virtual then the compiler chooses the wrong version, right?