Introduction to OOP: Chapter 9: Mechanisms for Software Reuse [next] [previous] [audio] [real] [text]

Composition

Composition is useful when the new software component can leverage off an existing system, but it differs in a fundamental way from the existing system.

Rule of thumb - try the sentence ``new-thing has-a old-thing''.

Intro OOP, Chapter 9, Slide 6