1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a state machine?
A behavior model capturing the dynamic behavior of an object in terms of states, events, and transitions.
In UML state machine diagrams, what is a state?
The condition of an object at a particular moment in time.
In UML state machine diagrams, what is an event?
A noteworthy occurrence that can trigger a state transition.
In UML state machine diagrams, what is a transition?
A directed relationship between states representing a change triggered by an event.
How is the initial state represented in a UML state machine diagram?
With a filled black circle.
What is the general format for a transition label in UML state machine diagrams?
trigger [guard] / action.
What is a guard in a state machine transition?
A precondition that must be true for the transition to occur.
What is a transition action in a state machine diagram?
An action executed when the transition occurs, such as invoking a method.
What types of objects are suitable for modeling with state machines?
State-dependent objects whose behavior varies based on their state, especially with complex reactive behavior.
According to the lecture, in which domains are state machines most commonly applied?
Communications and control applications, device controllers, UI flows, and protocols; less common in simple business information systems.
What is a nested state in a UML state machine?
A state containing substates, allowing hierarchical modeling where substates inherit superstate transitions.
How do nested states help manage state-dependent behavior?
They encapsulate behaviors that only apply when the system is within a particular superstate.
What is a choice pseudostate?
A diamond symbol representing a dynamic conditional branch, selecting one outgoing transition based on guard conditions.
What purpose does the [else] guard serve in a choice pseudostate?
To define the default transition when no other guard conditions are met.
How can time-triggered events be represented in state machines?
As a trigger on a transition, e.g., 'Timer reaches 30 seconds'.
In the pedestrian crossing light example, what triggers the transition from Red Standing to Green Walking?
The pedestrian presses the crossing button when the traffic light is Red.
In the telephone state machine example, what event transitions the phone from Idle to Active?
Picking up the receiver.
In the iPhone state machine example, what event toggles the phone between Sleep and Awake states?
Pressing the side button.
When might you choose a state machine diagram over a sequence diagram?
When object behavior is highly state-dependent and a sequence diagram would become overly complex.