AMSS Lecture 8: UML Design – Additional Diagram Types

Traian-Florin Șerbănuță

2025

Agenda

Interaction Diagrams

Structure Diagrams

Interaction Diagrams

1. Communication Diagrams

Emphasize data links between participants in the interaction.

1. Communication Diagrams (nested numbering)

1. Communication Diagrams (example)

1. Communication Diagrams vs. Sequence Diagrams

Aspect Sequence Diagram Communication Diagram
Focus Flow of messages Structural relationships among objects
Emphasis When messages occur Which objects interact
Layout Vertical lifelines; message flow top-to-bottom Graph layout; objects linked by message paths
Best For message order, concurrency, timing Collaboration structure and object roles
Mesage Order Vertical position Explicit sequence numbers (1, 1.1, 2…)
Use Case Complex logic, workflows, time-dependent behavior High-level interaction patterns object relationships

Interactive Exercise

Task

Model the basic interactions within an online ordering system when a customer places a food order online.

Guidelines

2. Interaction Overview Diagrams

  • Activity diagrams where actions are Interaction Diagrams (or references).

  • High-level control flow combining multiple interactions.

2. Interaction Overview example (all references)

2. Interaction Overview example

2. Interaction Overview exercise (Library Book Borrowing)

Task

Create an Interaction Overview Diagram (IOD) that shows the control flow of a user borrowing a book through an online library portal.

Guidelines

The diagram must include at least one interaction sub-diagram, such as a short sequence diagram or communication diagram.

The system consists of:

3. Timing Diagrams

Focus: timing constraints between state changes on different objects

3. Timing Diagrams with cross state-changes

3. Timing diagrams example (including messages)

3. Timing Diagram exercise

Create a UML Timing Diagram showing how three components in a smart-home lighting system (motion sensor, light controller, light) change states over time and respond to each other.

Initial States

Sequence of Events

  1. At t = 0s, the MotionSensor switches to NoMotion.

  2. After 10 seconds of no motion, the LightController transitions from Active → WaitingToOff.

  3. At t = 12s, the MotionSensor briefly detects motion again (DetectingMotion), causing:

    LightController → Active (cancel auto-off)

  4. At t = 18s, MotionSensor returns to NoMotion.

  5. After another 10 seconds of continuous no motion (i.e., at t = 28s), LightController sends command Light = OFF

Structure Diagrams

4. Composite Structure Diagrams

Used to show:

  • internal structure
    • interactions with environment through ports
  • behavior of a collaboration
TV Viewer Class
TV Viewer Class
TV Viewer as Composite Structure
TV Viewer as Composite Structure

4. Composite Structures example (internal structure)

4. Composite Structures example (collaboration)

Observer design pattern as a composite structure
Observer design pattern as a composite structure

4. Composite Structures exercise

Create a Composite Structure Diagram showing the internal structure of an AudioPlayback component in a music-player app.

Scenario

You are given a component called AudioPlayback, responsible for decoding and playing audio files. Internally, it contains three parts:

AudioPlayback component interacts with environment through:

Optional additions

Wrap-Up

Summary Table

Diagram Type Purpose
Communication Data links and message sequence
Interaction Overview High-level flow
Timing Time-based behavior
Composite Structure Internal architecture