Design an elevator control system
I was asked this
No reports yet. Sign in to say where you were asked it.
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:
ElevatorSystemorController,Elevator(current floor, direction, door state, stop set, load),Floorwith its hall buttons,Request(floor, direction, kind), aDispatcherstrategy interface, andDooror 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
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.


