Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Class Relationships

Classes are not isolated entities. They collaborate with each other to deliver the functionality of a software application. These collaborations can take different forms.

We begin this section by considering the idea that closely-related classes should be organized into logical groups called packages.

After that, we compare and contrast the simple transient dependencies between classes with a stronger, more long-lived type of relationship, termed association.

We finish the section by considering two specialized and subtly different kinds of association: aggregation and composition.