ISE · Introduction to Software Engineering

Chapter 06 · Unified Modeling Language (UML)

10 questions

The answers are not shown on this page. Use the questions to revise, then check yourself with the self-check quiz at the end of the slide deck.
  1. Question 1

    Which of these is a <em>structure</em> diagram in UML 2.5.1?

    • Sequence diagram
    • Class diagram
    • Activity diagram
    • State machine diagram
  2. Question 2

    In the Club Hub use case diagram, how is the «extend» arrow between "Join waiting list" and "Register for event" drawn?

    • Solid line from Register for event to Join waiting list
    • Dashed arrow from Register for event to Join waiting list
    • Dashed arrow from Join waiting list to Register for event
    • Hollow triangle pointing at Join waiting list
  3. Question 3

    What does <code>Event "1" -- "0..*" Registration</code> say?

    • Every event has at least one registration
    • An event has zero or more registrations; each registration belongs to exactly one event
    • A registration can belong to several events
    • An event can have at most one registration
  4. Question 4

    Applied: <code>class Club { std::vector<Event> events_; };</code> Which UML relationship does this member implement best?

    • Generalization from Club to Event
    • Dependency from Club to Event
    • Composition: Club "1" *-- "0..*" Event
    • Realization of an Event interface
  5. Question 5

    Applied: the class diagram shows <code>-phone: string [0..1]</code> in <code>Student</code>. Which C++ member matches it?

    • <code>std::string phone_;</code> set to "none" when missing
    • <code>std::optional<std::string> phone_;</code>
    • <code>std::vector<std::string> phones_;</code>
    • <code>std::string* phone_ = new std::string;</code>
  6. Question 6

    What is an object diagram?

    • A class diagram without operations
    • A snapshot of concrete objects and links at one moment, consistent with a class diagram
    • A diagram of the objects a sequence diagram creates over time
    • Another name for a component diagram
  7. Question 7

    In a sequence diagram, what does an <code>alt</code> fragment with guards [event is full] and [seats left] mean?

    • Both branches run in parallel
    • The branch is repeated until the guard is false
    • Exactly one branch runs, the one whose guard is true
    • The fragment is optional and may be skipped for any reason
  8. Question 8

    Applied: with the Registration state machine from this chapter, a CheckedIn registration receives <code>cancel</code>. What should <code>next(CheckedIn, Trigger::Cancel)</code> do?

    • Return Cancelled
    • Return Registered
    • Return CheckedIn unchanged and say nothing
    • Reject it: no transition leaves CheckedIn, so it throws
  9. Question 9

    In an activity diagram, what does a <em>join</em> bar do?

    • Chooses one of several outgoing flows
    • Waits until all incoming parallel flows have arrived, then continues
    • Ends the whole activity
    • Merges two alternative flows without waiting
  10. Question 10

    Which tool keeps diagrams as text that GitHub renders directly inside Markdown?

    • draw.io
    • PlantUML
    • Mermaid
    • None of them; all need an exported PNG