Bird
Raised Fist0

Which feature of elevator design best demonstrates the need for state machines?

easy🧠 Conceptual Q2 of Q15
LLD - Design — Elevator System
Which feature of elevator design best demonstrates the need for state machines?
AHandling multiple floors with different requests simultaneously
BUsing a single button to call the elevator
CHaving a fixed speed for the elevator
DThe elevator's color and design
Step-by-Step Solution
Solution:
  1. Step 1: Identify complexity in elevator operations

    Elevators must manage requests from multiple floors and decide movement accordingly.
  2. Step 2: Connect complexity to state machine use

    State machines help manage these multiple states and transitions based on requests and current position.
  3. Final Answer:

    Handling multiple floors with different requests simultaneously -> Option A
  4. Quick Check:

    Complex request handling [OK]
Quick Trick: Multiple requests need clear state transitions [OK]
Common Mistakes:
MISTAKES
  • Focusing on irrelevant features like color
  • Ignoring request handling complexity
  • Confusing fixed speed with state management

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes