RAD Studio (Common)
ContentsIndex
PreviousUpNext
Class Diagram Relationships (UML 1.5)

There are several kinds of relationships:

  • Association: A relationship between instances of the two classes. There is an association between two classes if an instance of one class must know about the other to perform its work. In a diagram, an association is a link connecting two classes. Associations can be directed or undirected. A directed link points to the supplier class (the target). An association has two ends. An end may have a role name to clarify the nature of the association. A navigation arrow on an association shows which direction the association can be traversed or queried. A class can be queried about its Item, but not the other way around. The arrow also lets you know who "owns" the implementation of the association. Associations with no navigation arrows are bi-directional.
  • Generalization/Implementation: An inheritance link indicating that a class implements an interface. An implementation has a triangle pointing to the interface.
  • Dependency
There are several subtypes of an association relationship:
  • Simple Association
  • Aggregation: An association in which one class belongs to a collection. An aggregation has a diamond end pointing to the part containing the whole.
  • Composition
Every class diagram has classes and associations. Navigability, roles, and multiplicities are optional items placed in a diagram to provide clarity. 

The multiplicity of an association end is the number of possible instances of the class associated with a single instance of the other end. Multiplicities are single numbers or ranges of numbers. This table lists the most common multiplicities:  

Multiplicities  

Multiplicity  
Meaning  
0..1  
Zero or one instance. The notation n . . m indicates n to m instances  
0..* or *  
No limit on the number of instances (including none)  
1  
Exactly one instance  
1..*  
At least one instance  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!