← Questions

Design an elevator control system

0
AmazonWaymoGoogleOO designLast asked Apr 2026

An object-oriented design interview question asked in Waymo's system design round and at Amazon and Google, last asked Apr 2026. It tests object-oriented design.

Design the object model for the elevators of a multi-floor building with several elevator cars. People press Up or Down on a floor, passengers choose a destination inside a car, and a controller decides which car serves each call.

Requirements

  • Functional: hall calls (Up/Down on each floor) and car calls (a floor chosen inside); cars move, stop, open and close doors; a dispatcher assigns hall calls to cars; cars serve several calls in one trip; capacity limits; maintenance and emergency modes.
  • Non-functional: short waiting times, no request lost or served twice, easy to add cars, floors or a new dispatching strategy.

Clarifying questions

  • How many floors and cars? Do all cars serve all floors?
  • Is the goal shortest wait, shortest trip, or least energy?
  • Does the car know its load (weight sensor)?
  • Is this a simulation with a clock, or a real-time controller?

What a strong answer covers

  • The main classes and what each owns: ElevatorSystem or Controller, Elevator (current floor, direction, door state, stop set, load), Floor with its hall buttons, Request (floor, direction, kind), a Dispatcher strategy interface, and Door or state enums.
  • The request flow end to end: a hall call reaches the controller, a car is assigned and adds the stop, it arrives and opens, the passenger presses a floor, the car serves stops in its current direction before turning around.
  • A dispatching strategy and why: nearest car moving toward the call in the same direction (the SCAN or LOOK idea), with costs for stops in between, and how it behaves in the morning rush when everyone goes up from the lobby.
  • State handling for direction (up, down, idle) and doors (open, closing, closed), and which transitions are allowed.
  • Extensions without rewriting: overload keeps the doors open, maintenance takes a car out of dispatching, fire mode sends every car to the ground floor, new strategies plug in.

Follow-ups

  • Write the method that picks a car for a new hall call.
  • A car breaks down with calls assigned to it. What happens to those calls?
  • How would you test the dispatcher without real elevators?

Where it's asked

  • Waymo · System design · Last asked Apr 202645 min · Design discussion
  • Amazon · Coding · Last asked Oct 202555 min · Usually two rounds; one is often an object-oriented design built in steps · No AI
  • Google · Onsite coding · Last asked Sep 202545 min · Usually two rounds, mostly in person: whiteboard plus a Chromebook with Google Docs · No AI (a pilot code-comprehension round lets candidates use Gemini)

What it tests

object-oriented design

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing