Design object model for an elevator system

Quick Overview

This question evaluates object-oriented design and system-architecture skills for modeling a multi-elevator control system, including class responsibilities, interactions, request flow, and scheduling policies.

Design object model for an elevator system

Company: Amazon

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

Design the object-oriented model for an elevator (lift) system in a multi-floor building that may have **multiple elevators**. The system should support: - **External requests**: people on each floor can press Up/Down call buttons. - **Internal requests**: passengers inside the elevator can select a destination floor. - An elevator can move up/down, open/close doors, and stop at requested floors. - A **scheduler/controller** decides which elevator should handle which requests (especially when there are multiple elevators). **Tasks** 1. Identify and describe the **main classes**, their responsibilities, and relationships. Examples might include: `Elevator`, `ElevatorController`, `Floor`, `Request`, `Button`, etc. 2. Explain how the system handles **request flow** end-to-end: - A user presses an Up/Down button on a floor. - An elevator is assigned and moves to that floor. - The user selects a destination floor inside the elevator. - The elevator services multiple requests while moving. 3. Propose a **scheduling strategy** (algorithm) for choosing which elevator should handle new requests (at a high level, not full code). Discuss how it works in typical scenarios (e.g., many people going up in rush hour). 4. Discuss how your design can handle **edge cases and extensions**, such as: - Elevators going into maintenance mode. - Overload (too many people inside). - Emergency stop or fire mode. - Adding more elevators or floors in the future. You may use UML-style notation or plain text descriptions for classes and interactions.

Overview: This question evaluates object-oriented design and system-architecture skills for modeling a multi-elevator control system, including class responsibilities, interactions, request flow, and scheduling policies.

|Home/Software Engineering Fundamentals/Amazon
Amazon logo
Amazon
Oct 31, 2025
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
12
0

Design the object-oriented model for an elevator (lift) system in a multi-floor building that may have multiple elevators.

The system should support:

  • External requests : people on each floor can press Up/Down call buttons.
  • Internal requests : passengers inside the elevator can select a destination floor.
  • An elevator can move up/down, open/close doors, and stop at requested floors.
  • A scheduler/controller decides which elevator should handle which requests (especially when there are multiple elevators).

Tasks

  1. Identify and describe the main classes , their responsibilities, and relationships. Examples might include: Elevator , ElevatorController , Floor , Request , Button , etc.
  2. Explain how the system handles request flow end-to-end:
    • A user presses an Up/Down button on a floor.
    • An elevator is assigned and moves to that floor.
    • The user selects a destination floor inside the elevator.
    • The elevator services multiple requests while moving.
  3. Propose a scheduling strategy (algorithm) for choosing which elevator should handle new requests (at a high level, not full code). Discuss how it works in typical scenarios (e.g., many people going up in rush hour).
  4. Discuss how your design can handle edge cases and extensions , such as:
    • Elevators going into maintenance mode.
    • Overload (too many people inside).
    • Emergency stop or fire mode.
    • Adding more elevators or floors in the future.

You may use UML-style notation or plain text descriptions for classes and interactions.

Loading comments...