Introduction to OOP Chapter 27: Implementation : next previous audio real text

Overridden Methods

We next consider those methods that are defined in a parent class, and overridden in a child class.

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
Intro OOP, Chapter 27, Slide 10