Bi-directional associations (or symmetric
associations) are the simplest way that two classes can relate
to each other. A bi-directional association is shown as a line between
two classes, and can contain control points. The classes can be any
mix of classes, simple classes, or composite classes.
Procedure
- Click the Association button
.
- Click in an element.
- Click in another element.
Results
In this example, notice the bi-directional
association line between two classes.
Note the following information:
- Associations specify how elements relate to each
other with role names. The relative numbers of objects participating
is shown with multiplicity.
- You can move an association name freely.
- If you remove the element at one end of an association
from the view, the association is also removed from the view. If you
delete an element at one end of an association from the model, the
association is also deleted.
- The role names and multiplicity are set in the
Features window for the association. To edit a role name or multiplicity,
double-click it.
- If you move an association line from between class x and
class y to between class x and class z,
where z is a subclass of y, it is
removed from y. But if z is a superclass
of y, it remains because all relationships with a
superclass are shared by their subclasses. If z and y are
independent, IBM® Rational® Rhapsody® moves
it from y to z.