Traian-Florin Șerbănuță
2025
Emphasize data links between participants in the interaction.
Sequence diagrams highlight temporal sequencing.
Communication diagrams highlight structural organization
| 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 |
Model the basic interactions within an online ordering system when a customer places a food order online.
Activity diagrams where actions are Interaction Diagrams (or references).
High-level control flow combining multiple interactions.
Create an Interaction Overview Diagram (IOD) that shows the control flow of a user borrowing a book through an online library portal.
The diagram must include at least one interaction sub-diagram, such as a short sequence diagram or communication diagram.
The system consists of:
UserPortal
SearchService
CatalogService
LoanService
NotificationService
Focus: timing constraints between state changes on different objects
Show the change of state over time.
Hardware design: modelling of real-time / cyberphysical systems
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.
MotionSensor = DetectingMotion
LightController = Active
Light = ON
At t = 0s, the MotionSensor switches to NoMotion.
After 10 seconds of no motion, the LightController transitions from Active → WaitingToOff.
At t = 12s, the MotionSensor briefly detects motion again (DetectingMotion), causing:
LightController → Active (cancel auto-off)
At t = 18s, MotionSensor returns to NoMotion.
After another 10 seconds of continuous no motion (i.e., at t = 28s), LightController sends command Light = OFF
Used to show:
Create a Composite Structure Diagram showing the internal structure of an AudioPlayback component in a music-player app.
You are given a component called AudioPlayback, responsible for decoding and playing audio files. Internally, it contains three parts:
Decoder
Buffer
OutputDevice (e.g., speakers or headphone jack)
AudioPlayback component interacts with environment through:
controlPort – receives play/pause/stop commands
audioPort – sends raw audio samples to hardware
| Diagram Type | Purpose |
|---|---|
| Communication | Data links and message sequence |
| Interaction Overview | High-level flow |
| Timing | Time-based behavior |
| Composite Structure | Internal architecture |