Suppose each of the base class and the derived class has a member function with the same signature. Suppose you have a base class pointer to a derived class object and call the common function member through the pointer. Discuss what determines which function is actually called, whether the one from the base class or the one from the derived class. Consider both the situations where the base class function is declared virtual and where it is not.
What will be an ideal response?
The non-virtual case: If the base class function does not carry the virtual modifier,
then the function called follows the pointer type, which is the base class function.
The virtual case: If the base class function carries the virtual modifier, then the
function called follows the object type, which is the derived class function.
Computer Science & Information Technology
You might also like to view...
In Access, what tool is used to create a list box to look up a value in another table, query, or list of values.?
A) Search Wizard B) Table Wizard C) Field Wizard D) Lookup Wizard
Computer Science & Information Technology
If you have already chosen a theme for your presentation, and then decide to change the theme, what happens to the shape effects that already exist?
What will be an ideal response?
Computer Science & Information Technology