Interfaces
Reading
Please read the Interfaces chapter and the Object Polymorphism chapter from the University of Helsinki’s online Java Programming course. This textbook is available for free online; the site asks you to create an account in order to use the interactive elements of the page, but that is not required for this reading assignment.
In the Interfaces chapter, read through the end of the section on “The List Interface.” You may stop at “The Map Interface.”
Important concepts
- interfaces
- polymorphism
Things to consider (exercises for yourself, not to turn in)
- The reading mentions that an interface is a contract of behavior. What sorts of challenges might come up if you change an interface that has been in use by other software for a while?
- We have already seen polymorphism in action! Think about or take a look at the kilt-graphics documentation again. Where can you find an example of polymorphism? (Hint: there are a few options!)
Your response
What was particularly interesting, confusing, or exciting to you in this reading?