Design a pizza ordering system
AmazonSoftware Engineer · Technical ScreenLast updated
This question evaluates object-oriented design and software architecture skills, focusing on class modeling, responsibilities, relationships, state management, pricing, payment flows, and extensibility.
Design the core object-oriented model for a pizza ordering system used by a small restaurant. The system should allow customers to:
- browse a menu of pizzas,
- customize each pizza by size, crust, and toppings,
- place an order containing one or more pizzas,
- calculate item prices and the final order total,
- choose pickup or delivery,
- pay using different payment methods,
- track order status such as placed, preparing, baking, ready, and delivered.
Discuss the main classes, responsibilities, relationships, and how you would make the design extensible for future features such as promotions or additional menu items.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.