Bird
Raised Fist0

What is the primary role of the Request class in an elevator system?

easy🧠 Conceptual Q11 of Q15
LLD - Design — Elevator System
What is the primary role of the Request class in an elevator system?
ATo store the floor number and direction of a user's request
BTo move the elevator between floors
CTo open and close the elevator doors
DTo track the number of elevators in the building
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of Request class

    The Request class holds information about where a user wants to go and in which direction.
  2. Step 2: Compare roles of other classes

    Elevator moves and Floor represents building levels, but Request stores user input details.
  3. Final Answer:

    To store the floor number and direction of a user's request -> Option A
  4. Quick Check:

    Request = user floor and direction [OK]
Quick Trick: Request class holds user floor and direction info [OK]
Common Mistakes:
MISTAKES
  • Confusing Request with Elevator movement
  • Thinking Request controls doors
  • Mixing Request with Floor class responsibilities

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes