Design an OOD restaurant management system
Company: Amazon
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
## Object-oriented design: Restaurant management system
Design an object-oriented system for a dine-in restaurant that supports the following:
### Functional requirements
- The restaurant has **tables** with capacity; parties can be **seated** at a table.
- A party can create **one or more orders**; an order contains multiple **order items** (menu item + quantity + special instructions).
- The kitchen tracks order item **states** (e.g., `PLACED`, `IN_PREP`, `READY`, `SERVED`, `CANCELLED`).
- The restaurant generates a **bill** for a table/party and supports **splitting the bill** (by item or by amount).
- Payment can be made via multiple methods (cash/card); a bill can have multiple payments.
### Non-functional / design goals
- Clean separation of concerns (table management, ordering, kitchen workflow, billing/payments).
- Extensible to add features later (takeout/delivery, discounts, loyalty).
### What to provide
- Key classes, fields, and methods (UML-style text is fine).
- Important relationships (composition/aggregation) and patterns if appropriate.
- Brief explanation of how typical flows work (seat → order → prepare → serve → bill → pay).
Quick Answer: This question evaluates object-oriented design skills including domain modeling, class relationships (composition/aggregation), state management, separation of concerns, and extensibility for billing, ordering, and kitchen workflows.