OMG-OCUP2-FOUND100 practice question 4 of 15

Which scenario would be modeled most appropriately in a state machine?

Full set: 89 questions
Answer options
A: the use of buttons to control a digital watch
B: the exchange of messages in a client-server system
C: the data flows and processes in an office automation system
D: the nature of the transitions from ice to water to steam in a physical system Correct answer
E: the overview of behavior and message exchange in a distributed medical insurance system
Correct Answer:
D. the nature of the transitions from ice to water to steam in a physical system
Explanation

A state machine captures an entity whose behavior is governed by a finite set of discrete, mutually-exclusive states and well-defined transitions among them. Phase changes of H₂O—ice → water → steam—are exactly such a phenomena: clear physical states, deterministic transitions triggered by temperature/pressure conditions. Therefore this scenario is most naturally represented by a UML state machine.

Why Incorrect

A. Button interactions are better modelled by a user-interface activity or sequence diagram.
B. Client-server message exchanges are protocol interactions; sequence or communication diagrams suit better.
C. Data flows are modelled with activity or data-flow diagrams.
E. System-level overview with many collaborating components exceeds the focus of a single state machine; composite interaction diagrams are preferable.

References

1. OMG UML 2.5.1, §14 “State Machines”, p. 301 (definition and intent).

2. Fowler, M. “UML Distilled”, 3 rd ed., §9 (examples of physical-state modelling).

3. University of Toronto CSC407 course notes, “Using State Machines for Physical State Modelling”, 2018, pp. 4-5.

Scroll to Top