Design an Elevator Control System

Quick Overview

This question evaluates object-oriented design, state modeling, and scheduling algorithm competencies for coordinating multiple elevators, including class responsibilities, state transitions, and request dispatching.

Design an Elevator Control System

Company: Salesforce

Role: Backend Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Onsite

Design an object-oriented elevator control system for a building with multiple floors and multiple elevators. The system should support: - Hall requests from each floor, where a user can request to go up or down - Cabin requests from inside an elevator, where a user selects a destination floor - Tracking each elevator's current floor, direction, door state, and pending stops - Assigning hall requests to an appropriate elevator - Moving elevators efficiently while avoiding obviously poor scheduling decisions Focus on clean object-oriented design and the core scheduling logic. You do not need to model low-level motor hardware, networking, or a graphical UI. Discuss the main classes, responsibilities, state transitions, and how requests are processed. If useful, also describe a simple dispatch algorithm and how you would extend the design later.

Quick Answer: This question evaluates object-oriented design, state modeling, and scheduling algorithm competencies for coordinating multiple elevators, including class responsibilities, state transitions, and request dispatching.

|Home/Software Engineering Fundamentals/Salesforce
Salesforce logo
Salesforce
Dec 4, 2025, 12:00 AM
easyBackend EngineerOnsiteSoftware Engineering Fundamentals
16
0

Design an object-oriented elevator control system for a building with multiple floors and multiple elevators.

The system should support:

  • Hall requests from each floor, where a user can request to go up or down
  • Cabin requests from inside an elevator, where a user selects a destination floor
  • Tracking each elevator's current floor, direction, door state, and pending stops
  • Assigning hall requests to an appropriate elevator
  • Moving elevators efficiently while avoiding obviously poor scheduling decisions

Focus on clean object-oriented design and the core scheduling logic. You do not need to model low-level motor hardware, networking, or a graphical UI.

Discuss the main classes, responsibilities, state transitions, and how requests are processed. If useful, also describe a simple dispatch algorithm and how you would extend the design later.

Loading comments...