UML_Sequence_Diagram - SYSC3020-Winter2016/SYSC3020LectureNotes GitHub Wiki

A UML Sequence diagram captures the interaction between objects in the context of a use case.

This interaction is represented by messages exchanged between instances of classes.

Horizontally, the different interacting objects are aligned. The vertical dimension represents time that flows top to bottom. Typically, delays in messages arriving and processes are ignored: this means the time dimension only shows the order of events rather than the actual time the processing takes.

The classes are taken from the class diagram. This means, the two diagrams should be consistent. If it appears new classes are needed, then these classes should be added back to the class diagram. A Use Case is initiated by a primary actor, which should be identified first. This actor should interact with a Entity, Boundary, Control object, representing a system interface. In some cases the actor could also be the boundary object itself, e.g. a sensor.

In the E/B/C methodology, a control class is typically created for the use case. This control class takes the input from the boundary object and passes it to relevant entity objects (or to other control objects).

The control flow within the use case, i.e. loops, branches, or events that should happen in parallel. are represented by frames.

When diagrams get complex, parts of the interaction can be extracted and represented in separate use case diagrams. The main diagram then refers to these using a "reference" frame.

Example from FRIEND: Alt

Also see Lab 3.

⚠️ **GitHub.com Fallback** ⚠️