238 ◾ Software Essentials
subtyping (specialization) retains the is-a relationship but its modication
of inherited behavior may compromise the notion of substitutability.
As noted in Chapter 6, a simple example of extension is a TriAthlete
class. A TriAthlete is-a BiAthlete, that is a TriAthlete runs and bikes like a
BiAthlete but also swims. A BiAthlete is-a Runner, that is a BiAthlete runs
like a Runner but also bikes. Extension diers from specication in that
the base class is not abstract but an existing usable type. Extension diers
from specialization in that the derived classes extend, and do not compro-
mise, the inherited interface.
e last two types of inheritance design delineated in Table 8.2 describe
class designs that reuse ...