An association on a class diagram represents a relationship between classes, or between a class and an interface. On a usecase diagram, an association binds an actor to a usecase.
Within the UML metamodel,
is a sub-class of both
The association is represented as a solid line connecting actor and usecase or class or interface (see Figure 18.1, “ Possible model elements on a class diagram. ”). The name of the association and any stereotype appear above the line.
ArgoUML is not restricted to binary associations. See Section 18.12.1, “ Three-way and Greater Associations and Association Classes ” for more on this.
Associations are permitted between interfaces and classes, but UML 1.3 specifies they must only be navigable toward the interface -in other words the interface cannot see the class. ArgoUML will draw such associations with the appropriate navigation.
Associations are often not named, when their meaning is obvious from the context.
ArgoUML provides no specific way of showing the direction of the association as described in the UML 1.4 standard. The naming should attempt to make this clear.
The association contains at least two ends, which may be navigated to via the association property sheet. See Section 18.13, “ Association End ” for more information.
UML 1.3 provides for N-ary associations and associations that are governed by a third associative class. Both are supported by ArgoUML.
N-ary associations are created by drawing with the association tool from an existing association to a third class. The current implementation of ArgoUML does not allow the inverse: drawing from a 3rd class towards an existing association is not possible.
Association Classes are drawn exactly like a normal association, i.e. between two classes, but with a different dedicated tool from the diagram toolbar.
The details tabs that are active for associations are as follows.
Standard tab. See Section 13.4, “ Documentation Tab ”.
The values for the bounds of the Association have no meaning, since they are determined by the location of the connected items. Changing them has no effect on the diagram.
Standard tab. You would not expect to generate any code for an association, and any code entered here is ignored (it will have disappeared when you come back to the association.
Standard tab. In the UML metamodel,
Association has the following standard tagged
transitory, indicating state is
destroyed when an instance is destroyed or
persistent, marking state is preserved
when an instance is destroyed.
derived (from the
true, meaning the
association is redundant -it can be formally derived
from other elements, or
meaning it cannot.
Derived associations still have their value in analysis to introduce useful names or concepts, and in design to avoid re-computation.
Navigate up through the package structure of the model. For an association this will be the package containing the association.
This creates a new Stereotype (see Section 16.6, “ Stereotype ”) for the selected association, navigating immediately to the properties tab for that stereotype.
This deletes the selected association from the model.
This is a deletion from the model
not just the diagram. To delete
an association from the diagram, but keep it within
the model, use the main menu
Text box. The name of the association. By
convention association names start with a lower case
letter, with “bumpy caps” used to indicate
words within the name, thus:
ArgoUML does not enforce any naming convention for associations.
Although the design critics will advise otherwise, it is perfectly normal not to name associations on a class diagram, since the relationship is often obvious from the classes (or class and interface) name.
Drop down selector. Association is provided by
default with the UML standard stereotype for
Stereotyping can be useful when creating associations in the problem domain (requirements capture) and solution domain (analysis), as well as for processes based on patterns.
The stereotype is shown between « and » below the name of the association on the diagram.
icon. If a stereotype has been selected, this will navigate to the stereotype property panel (see Section 16.6, “ Stereotype ”).
Drop down selector. Records and allows changing the namespace for the association. This is the package hierarchy.
Text area. Lists the ends of this association. An association can have two or more ends. For more on association ends see Section 18.13, “ Association End ”.
The names of the association ends are listed,
unless the association end has no name (the case when
it is first created), in which case
AssociationEnd) is shown.
The only representation of association ends on a diagram is that their name appears at the relevant end of the corresponding association.
Button 1 double click on an association end will navigate to that end.
Text area. (To be written)
Text area. (To be written)