27.4. Association Role Names

Each end of an association is a role, which has various properties, such as:

  • name

  • multiplicity

A role name identifies an end of an association and ideally describes the role played by objects in the association. Figure 27.10 shows role name examples.

Figure 27.10. Role names.

An explicit role name is not required—it is useful when the role of the object is not clear. It usually starts with a lowercase letter. If not explicitly present, assume that the default role name is equal to the related class name, though starting with a lowercase letter.

As covered previously during a discussion of mapping designs to code, roles ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition 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.