O'Reilly logo

Learning UML by Sinan Si Alhir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Collaboration Diagrams

A collaboration diagram shows elements as they interact over time and how they are related. That is, it shows a collaboration or collaboration instance. While sequence diagrams are time-oriented and emphasize the overall flow of an interaction, collaboration diagrams are time- and space-oriented and emphasize the overall interaction, the elements involved, and their relationships. Sequence diagrams are especially useful for complex interactions, because you read them from top to bottom. Collaboration diagrams are especially useful for visualizing the impact of an interaction on the various elements, because you can place an element on a diagram and immediately see all the other elements with which it interacts.

Elements

Collaboration diagrams are made up of a number of elements, including class roles, specific objects, association roles, and specific links. All of these are described in the following subsections.

Class and association roles

In a collaboration diagram, class roles and other classes are shown using the same notation as in sequence diagrams. An association role is shown using the notation for associations as defined in Chapter 3, but the association name is preceded by a forward slash followed by the name of the role followed by a colon to which links must conform to participate within the role. Other associations may also be shown as necessary using the notation for associations as defined in Chapter 3.

Class roles, association roles, other classes, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required