Bird
0
0

In an elevator state machine, which of the following correctly shows a transition from Idle to MovingUp on receiving a GoUp event?

easy🧠 Conceptual Q3 of 15
LLD - Design — Elevator System
In an elevator state machine, which of the following correctly shows a transition from Idle to MovingUp on receiving a GoUp event?
AIdle --GoUp--> MovingUp
BMovingUp --Idle--> GoUp
CGoUp --Idle--> MovingUp
DIdle --MovingUp--> GoUp
Step-by-Step Solution
Solution:
  1. Step 1: Understand state transition notation

    State transitions are typically represented as CurrentState --Event--> NextState.
  2. Step 2: Identify the correct transition

    The elevator moves from Idle to MovingUp when it receives a GoUp event, so the correct syntax is Idle --GoUp--> MovingUp.
  3. Final Answer:

    Idle --GoUp--> MovingUp -> Option A
  4. Quick Check:

    Check event is between states with arrows [OK]
Quick Trick: State transitions: CurrentState --Event--> NextState [OK]
Common Mistakes:
MISTAKES
  • Confusing event and state order
  • Using incorrect arrow direction
  • Placing event after next state

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes