Lecture 16
14
Polymorphism
 poly (many) + morph (shape)
•Bank
–maintains a list of BankAccount objects
–sends them messages
–without knowing what kinds of BankAccounts they are!
•Client refers to objects of type Parent that are really instances of a Child extending Parent
•Each child responds in its own particular way
•Powerful design tool -  ignorance is bliss
–
This is the most important new concept for this lecture. We return to it several times. Review the previous slide after looking at this one, point out how the Bank doesn’t care what each individual account does when it gets the newMonth message.