Chapter 14
Polymorphism and Software Reuse
In this chapter and in the four that follow we begin an investigation of the mechanisms that are in object-oriented programming languages collectively described using the term polymorphism. We have seen simple examples of most of these—for example, overriding—in earlier chapters. However, an in-depth treatment will allow us to explore details that might not be obvious from a cursory explanation. After examining the various techniques denoted by this term we then examine, starting in Chapter 19, several applications of polymorphism to a range of common problems.
The term polymorphic has Greek roots and means, roughly, “many forms.” (poly = many, morphos = form. Morphos is related to the Greek god Morphus, ...
Get An Introduction to Object-Oriented Programming, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.