← Amazon Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

Amazon SWE interview with an object-oriented design question that was way more involved than I expected. They wanted a full pizza ordering system with class diagrams, multiple design patterns, and a discussion of extensibility and concurrency. Felt like a mini system design session crammed into one question.

Questions Asked (1)

Q1

Design a pizza ordering system with full OOP: customers can customize pizzas (size, crust, sauce, cheese, toppings), add side items, compute total price with multipliers and promotions, and track the order through its full lifecycle from placement to delivery or pickup.

System DesignTechnical Trade-offsData Modeling
Author's notes

I jumped straight into classes and started listing Pizza, Order, Customer without thinking about the design patterns first, which made my initial diagram kind of a mess.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scope, then model the domain using OOP principles, focusing on extensibility and separation of concerns. Walk through the order lifecycle, highlighting state transitions and pricing strategies, and discuss trade-offs in design choices.

Pro tip: Emphasize extensibility and maintainability by using design patterns like Strategy for pricing and State for order lifecycle, and discuss how you would handle concurrency and scalability in a real system.

1. Clarify Requirements and Scope

Ask questions to understand functional and non-functional requirements, such as customization options, pricing rules, order tracking, and expected scale. Confirm assumptions about payment, user accounts, and integration points.

2. Identify Core Domain Objects

Define the main entities: Customer, Order, Pizza, SideItem, Topping, etc., and their relationships. Use inheritance and composition to model customization options (e.g., Size, Crust, Sauce as attributes or classes).

3. Design Pricing and Promotions

Implement a flexible pricing mechanism using the Strategy pattern to handle base prices, size multipliers, topping costs, and promotions. Ensure pricing logic is decoupled and easily extendable.

4. Model Order Lifecycle with State Pattern

Define states (e.g., Placed, Preparing, Baking, Ready, OutForDelivery, Delivered, PickedUp) and transitions. Use the State pattern to encapsulate state-specific behavior and enforce valid transitions.

5. Discuss Trade-offs and Scalability

Address trade-offs in design choices (e.g., inheritance vs. composition, pattern usage) and discuss how to scale the system (e.g., database design, caching, concurrency). Mention potential extensions like discounts, loyalty programs, and notifications.

Key Points to Mention

  • Use of design patterns: Strategy for pricing, State for order lifecycle, Factory for creating pizzas with customizations.
  • Separation of concerns: distinct classes for Order, Pizza, Pricing, and OrderTracker.
  • Extensibility: how to add new toppings, crusts, or promotions without modifying existing code (Open/Closed Principle).
  • Data modeling: relationships between entities, and how to persist orders (e.g., using an ORM or NoSQL).
  • Concurrency and consistency: handling multiple orders, inventory checks, and payment processing in a distributed environment.
  • Trade-offs: simplicity vs. flexibility, performance implications of design choices, and testability.

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