
181
Chapter 7
Behavioral Design
P
for automatic type checking greatly
advanced the pace and breadth of soware development. Chapter 6
explored this capacity for reuse as supported via the inheritance construct.
is chapter continues the examination of inheritance with a focus on its
support for dynamic function selection, also known as polymorphism.
We begin by dening three forms of polymorphism used in soware and
then examine subtype polymorphism in depth.
To highlight an eective design using subtype polymorphism, we
examine abstract classes and the resulting support of heterogeneous col-
lections and ease of sow ...