Association Class

Return to Introduction  Previous page  Next page

d_AssociationClass

An Association Class connection is a UML construct that enables an Association connector to have attributes and operations (features). This results in a hybrid relation with the characteristics of a connection and a Class. It is used to model particular types of connections in UML (see the OMG UML Specification for more details).

When you add an Association Class connection, Enterprise Architect also creates a Class that is automatically linked to the Association. When you hide or delete the Association, the Class is also hidden or deleted.

To add an Association Class to a Class or Deployment diagram, click on the Association Class icon in the Enterprise Architect UML Toolbox. Click and hold on the source object in the diagram while you drag the line to the target element, then release the mouse button. Enterprise Architect draws the connector and adds the Class, then prompts you to add the Class name. Note that the names of the Class and the connector are the same. You can also link a new Class to an existing Association.

The following diagram illustrates an Association Class between model elements. Note the dotted line from the Class to the Association. You cannot move or delete this line.

AssociationClassDiagram

Toolbox Icon

c_AssociationClass

OMG UML Specification

The OMG UML specification (UML Superstructure Specification, v2.0, p. 118) states:

"A model element that has both association and class properties. An AssociationClass can be seen as an association that also has class properties, or as a class that also has association properties. It not only connects a set of classifiers but also defines a set of features that belong to the relationship itself and not to any of the classifiers."