Bird
0
0

Which of the following is the correct way to represent the state transitions for a system with states idle, moving up, and moving down?

easy🧠 Conceptual Q12 of 15
LLD - Design — Elevator System
Which of the following is the correct way to represent the state transitions for a system with states idle, moving up, and moving down?
Amoving down -> moving up -> idle only
Bidle -> moving up -> moving down -> idle
Cmoving up -> moving down -> idle only
Didle -> moving up, idle -> moving down, moving up -> idle, moving down -> idle
Step-by-Step Solution
Solution:
  1. Step 1: Identify valid transitions between states

    The system can start idle, then move up or down, and return to idle after movement.
  2. Step 2: Check which option lists all valid transitions

    idle -> moving up, idle -> moving down, moving up -> idle, moving down -> idle correctly lists transitions from idle to moving states and back to idle.
  3. Final Answer:

    idle -> moving up, idle -> moving down, moving up -> idle, moving down -> idle -> Option D
  4. Quick Check:

    Valid transitions include idle to moving and back [OK]
Quick Trick: State transitions must include all valid moves between states [OK]
Common Mistakes:
MISTAKES
  • Assuming linear transitions only
  • Missing transitions back to idle
  • Ignoring that moving up and down are separate states

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes