← Amazon Interview Insights

Amazon·Software Engineer·Onsite - System Design / Architecture·Intermediate

IntermediatePrefer not to say
Jul 2026

Summary

Amazon system design round for a software engineer role, one question the whole time about modeling a pizza ordering system. Pretty open-ended which I wasn't expecting, felt like I was rambling for a while before I found my footing.

Questions Asked (1)

Q1

Design the core object-oriented model for a pizza ordering system. Cover the main classes, their responsibilities, relationships, and how you'd make the design extensible for things like promotions or new menu items. The system needs to support browsing a menu, customizing pizzas, placing orders, calculating prices, choosing pickup or delivery, multiple payment methods, and order status tracking.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with Pizza and Order and thought I was done in five minutes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scope, then identify core entities and their responsibilities, and finally design relationships and extensibility mechanisms. Use a layered approach: model the domain, define interfaces for key behaviors, and apply design patterns to handle variability.

Pro tip: Emphasize extensibility through composition and interfaces rather than inheritance, and mention how you'd handle pricing rules with a strategy or decorator pattern to avoid modifying existing code for new promotions.

1. Clarify Requirements and Scope

Ask clarifying questions about menu complexity, customization options, payment methods, and order tracking to bound the problem. Confirm non-functional needs like extensibility and scalability.

2. Identify Core Entities and Responsibilities

List main classes such as Menu, Pizza, Order, Customer, Payment, and Delivery, and assign clear single responsibilities to each. Ensure each class has a focused role.

3. Define Relationships and Interactions

Establish associations, aggregations, and dependencies between classes, e.g., Order contains OrderItems, Pizza is composed of Toppings, and Payment is associated with Order. Use UML-like notation if helpful.

4. Design for Extensibility

Apply design patterns like Strategy for pricing/promotions, Decorator for toppings, and Factory for creating menu items. Use interfaces to decouple implementations and allow new features without modifying existing code.

5. Validate with Scenarios and Trade-offs

Walk through key use cases (e.g., customizing a pizza, applying a promotion) to validate the design. Discuss trade-offs between flexibility and complexity, and justify your choices.

Key Points to Mention

  • Use of composition over inheritance to model pizza customization (e.g., Decorator pattern for toppings).
  • Strategy pattern for pricing and promotions to allow dynamic rule changes.
  • Separation of concerns: Order, Payment, and Delivery as distinct entities with clear interfaces.
  • State pattern or status enum for order tracking to manage transitions.
  • Factory pattern for creating menu items to encapsulate instantiation logic.
  • Open/Closed Principle: design should allow adding new menu items or promotions without modifying existing code.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.