Unit 11 · overview

Unit 11: Composition and Collaborating Objects

Large behavior does not require one giant class or one giant inheritance hierarchy.

Composition builds a system from objects that collaborate:

ReportService has a Formatter
ReportService has a MessageSink
RobotController has a Sensor
RobotController has an Actuator

This unit focuses on has-a relationships, dependency injection, responsibility boundaries, and change impact. Inheritance comes next, after you have a stronger default tool for combining behavior.