volume_mute

Sequence Diagram — Availability Check

publish date2026/06/08 22:17:19.966005 UTC

volume_mute

In a sequence diagram for university course registration, the registration process must include checks that places are available. Which UML sequence diagram element would you use to model the two alternative outcomes: registration succeeds (places available) vs. registration fails (course full)?

Correct Answer

An alt box with guard conditions [places available] and [course full], separating the two alternative interaction paths

Explanation

The alt box with guard conditions is the correct sequence diagram element for modeling mutually exclusive alternative interactions. Guard conditions in square brackets ([places available] and [course full]) select which alternative path is followed. A solid bar is for concurrent/parallel flows. Diamond nodes belong to activity diagrams, not sequence diagrams. While separate diagrams are possible, an alt box is the standard approach for alternatives within one diagram.

Reference

Software Engineering, Ian Sommerville, 9th edition


Quizzes you can take where this question appears