Bird
0
0

You are designing an elevator system with multiple elevators and floors. Why is modeling the system as a state machine important for safety and scalability?

hard📝 Trade-off Q15 of 15
LLD - Design — Elevator System
You are designing an elevator system with multiple elevators and floors. Why is modeling the system as a state machine important for safety and scalability?
AIt eliminates the need for sensors and hardware checks
BIt allows elevators to learn user preferences automatically
CIt ensures predictable behavior and clear transitions, preventing unsafe states
DIt reduces the number of elevators needed by half
Step-by-Step Solution
Solution:
  1. Step 1: Understand state machine benefits in complex systems

    State machines define clear states and transitions, making system behavior predictable and easier to manage.
  2. Step 2: Connect predictability to safety and scalability

    Predictable transitions prevent unsafe states like doors opening while moving, and help scale by managing multiple elevators consistently.
  3. Final Answer:

    It ensures predictable behavior and clear transitions, preventing unsafe states -> Option C
  4. Quick Check:

    Predictable states = safety and scalability [OK]
Quick Trick: Predictable states prevent unsafe elevator behavior [OK]
Common Mistakes:
MISTAKES
  • Confusing state machines with AI
  • Ignoring safety in design
  • Assuming hardware replaces software logic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes