Chapter 4. The Relationships Between Classes and Objects

Introduction to Class and Object Relationships

An object-oriented design requires that the developer first find some of the key abstractions of the system along with their well-defined public interfaces. The second step consists of describing the relationships between these key abstractions. In the object-oriented paradigm, we discuss these relationships as falling into one of four categories:

  • the uses relationship (object-based);

  • the containment relationship (object-based);

  • the inheritance relationship (class-based);

  • the association relationship (object-based).

The term “object-based versus class-based” does not describe the method in which a relationship is defined, namely, with objects or with ...

Get Object-Oriented Design Heuristics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.