Introduction to OOP
Chapter 14: Polymorphism and Software Reuse:
next
previous
audio
real
text
Two Approaches to Software Reuse
One of the major goals of OOP is software reuse. We can illustrate this by considering two different approaches to reuse:
Inheritance -- the
is-a
relationship.
Composition -- the
has-a
relationship.
We do this by considering an example problem that could use either mechanism.
Intro OOP,
Chapter 14
, Slide 04