Design a pizza ordering system
Company: Amazon
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
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.
Quick Answer: This question evaluates object-oriented design and software architecture skills, focusing on class modeling, responsibilities, relationships, state management, pricing, payment flows, and extensibility.