Sequence Diagram — Availability Check
publish date: 2026/06/08 22:17:19.966005 UTC
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
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
