Use an association class Association Class shape iconin a static structure diagram to add attributes, operations, and other properties to an association. Drawn as a class attached by a dashed line to an association, an association class is actually a single modeling element. The element has a single name that can appear on the association, in the class, or in both places. The association ends can have the usual adornments.

Name an Association Class shape and add adornments to its ends

Open the element's UML Properties dialog box by double-clicking the icon that represents the element in the tree view or the shape that represents the element in a diagram.

Tip

Control which property values appear on a shape in a diagram by right-clicking the shape, and then clicking Shape Display Options. In the UML Shape Display Options dialog box, select and clear options to display or hide property values.

Hide the attributes or operations sections of an association class

Right-click the shape, click Shape Display Options, and then, under Suppress, check Attributes or Operations.

Control which property values appear on the Association Class shape

Right-click the shape, click Shape Display Options, and then select or clear options to show or hide values.

Create a diagram owned by the association class

Right-click the shape, click Diagrams, click New, choose the type of diagram you want, and then click OK.

Navigate to other views of the association

Right-click the shape, click Views, select the view you want, and then click OK.

For information on the properties of this shape, click one of the headings below.

Name

Type a name for the association class.

Full Path

The UML Model Diagram template automatically provides full information about the element's path in the system model hierarchy. You can't edit this information but if you move elements the path automatically updates.

Stereotype

Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.

End Count

An association class has only two ends so you cannot change the end count here. For an n-ary association class, choose the number of ends you want.

Association Ends

Lists the association ends.

To quickly edit the most commonly used settings for an association end, click a field in the Association Ends list, and then select or type a value.

To access all of the settings for an association end, select the association end in the list, and then click Properties.

  • End Name  Type an end name for the association end. The name indicates the role played by the class attached to the end.

  • Aggregation  Choose the aggregation you want. Only one association end can be an aggregation.

  • None means that the end is not an aggregate.

  • Shared means that the end is an aggregate and that the other end is a part and must have the aggregation value of none. The part can be contained in other aggregates. Choosing this option adds a hollow diamond to the end.

  • Composite means the end is a composite and that the other end is a part and must have an aggregation value of none. The part can't be part of any other composite. Choosing this option adds a filled diamond to the end.

  • Visibility  Choose the type of visibility (public, private, or protected) that applies to the association end.

  • Multiplicity  Choose an option to specify the number of target instances that can be associated with a single source instance across the association.

  • IsNavigable  Select to indicate that navigation is supported toward the target instance. Selecting this option adds an arrow to the association end. Clear it to indicate that navigation is not supported. To decrease complexity in diagrams, navigability is often shown only in exceptional situations.

Properties

After you select an end under Association Ends, click to display the UML Association End Properties dialog box, which includes five categories that you can use to add property values to define an association end: Association End, Qualifier Attributes, Specification, Constraints, and Tagged Values. See for more details.

Visibility

Choose the type of visibility (public, private, or protected) that applies to the association class.

IsRoot

Select to indicate that the association class can't have ancestors.

IsLeaf

Select to indicate that the association class can't have descendants.

IsAbstract

Select to indicate that the association class is abstract and that no instances can be created for the association class.

IsActive

Select to specify that an object of the association class maintains its own thread of control.

Documentation

Type any documentation you want to add to the element as a tagged value. When you select the shape or icon representing the element, the documentation you type here also appears in the Documentation window.

Add or edit UML element attributes

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.