Bird
Raised Fist0

If an elevator is in MovingDown state and receives a 'Stop' event, which state should it transition to?

medium📝 Analysis Q5 of Q15
LLD - Design — Elevator System
If an elevator is in MovingDown state and receives a 'Stop' event, which state should it transition to?
ADoorOpen
BMovingUp
CIdle
DMovingDown
Step-by-Step Solution
Solution:
  1. Step 1: Identify current state and event

    Elevator is MovingDown; event is 'Stop'.
  2. Step 2: Understand typical elevator behavior

    On 'Stop', elevator should stop moving and become Idle.
  3. Final Answer:

    Idle -> Option C
  4. Quick Check:

    MovingDown + Stop = Idle [OK]
Quick Trick: Stop event leads to Idle state [OK]
Common Mistakes:
MISTAKES
  • Choosing DoorOpen instead of Idle
  • Remaining in MovingDown state
  • Switching to MovingUp incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes