Relationships

Relationships between classes are necessary because object-oriented systems are based on the collaboration of objects to accomplish a particular end goal (articulated in the use-cases). Like a network, relationships define the pathways between classes and serve as the messaging media across which objects can communicate. Relationships also define a context between classes prior to instantiation and as objects after instantiation. They then define how the classes of the application function as an integrated whole.

UML is quite rich in its ability to represent relationships between classes. It supports three types of relationships:

  1. Association: The most common type of UML relationship, an association, defines how objects of one class ...

Get Developing Applications with Java™ and UML 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.