A good answer might be:The class of the object. | |
Card PolymorphismIt makes sense that the object's method is invoked, since, after all, the object's data is used by the method. Here is an example from the previous chapter:
The reference variable card is used three times, each time with a different class of object. Since Card is a parent to the three different classes, the variable card can be used for each. | |
QUESTION 6:Could a variable Valentine val be used with a Holiday object? Click Here after you have answered the question |