An Association Class is a model element with both Association and Class properties. You can look at an Association Class as an Association that also has Class properties, or as a Class that also has Association properties. Additionally, it connects a set of classifiers and defines a set of features belonging only to the relationship and not to any of the classifiers.
Example of an association class.
To draw an association class
- Draw two Classes.
Click the Association Class button on the diagram palette.
Association Class button
If you do not see the Association Class button in the diagram palette, click the black arrow next to the Association button to see the list of associations. Select Association Class from the list.
- On the diagram pane, click the first Class shape (path source).
- Drag the path to the second Class (path destination) and drop it there.
If you need to model a relationship among several classes, you should use the N-ary Association. The N-ary association is drawn as a big diamond with all associations attached to its points. Every involved Class can have a role name and multiplicity.
To draw an N-ary association class
- Draw several Classes on the diagram pane.
Draw the N-ary Association connector shape.
N-ary Association button
If you do not see the N-ary Association button in the diagram palette, click the black arrow next to the Association button to see the list of Associations. Select N-ary Association from that list. See the figure above.
- Connect all classes to the N-ary Association using an Association relationship.