Introduction to OOP | Chapter 27: Implementation : | next | previous | audio | real | text |
Problem, how can a polymorphic method invocation find the right method? Note that the right method can change during the course of execution, even for the same method call.
CardPile * aCardPile = new DiscardPile(); Card * aCard = ... ; aCardPile->addCard (aCard); // how to find the right method