5. Polymorphism

Polymorphism means that the sender of a message does not need to be aware of which class the receiving object belongs to. The receiving instance can belong to an arbitrary class .

5.1. What is important?

A sender object needs only to know that another object can perform a certain behaviour, not which class it belongs to nor which operations will perform that behaviour.

5.2. Advantage

Flexible and modification resistant systems can be implemented. When a new object from a new class is added, this modification should only affect this new object not those who send messages to it.

Figure 1.5. Polymorphism

Polymorphism

5.3. Audio

Audio in Portuguese