Tier 1 · Foundations

Core Concepts

OOP Pillars

SOLID Principles

Creational Patterns

Structural Patterns

Behavioral Patterns

Tier 2

Tier 3

Tier 4

Tier 5

Tier: 4 — Hard Domain: E-Commerce / Retail Key Patterns: Strategy, Observer, Factory


Phase 1: Requirements & Use Cases

Interviewer: "Design an online shopping system."

Candidate: "Let me make sure I understand the scope before modeling anything. We're talking about a class-level OOD for a system where customers browse a product catalog, manage a shopping cart, place orders, and pay for them. Think of something in the spirit of Amazon or a mid-sized e-commerce platform — not the infrastructure behind it, just the object model. Does that match your intent?"

Interviewer: "Yes. Walk me through the actors first."

Candidate: "I see four distinct actors:

  1. Customer — browses the catalog, manages their cart, places and tracks orders
  2. Guest — can browse and add to cart, but must register before checkout
  3. Admin — manages product listings, inventory, and categories
  4. System — processes payments, sends notifications, updates order status

For core use cases, I want to cover six:

  1. Browse & search catalog — filter by category, keyword, price range
  2. Manage shopping cart — add, update quantity, remove items
  3. Checkout — validate cart, apply discounts, confirm shipping address
  4. Process payment — support multiple payment methods (credit card, PayPal, wallet)
  5. Manage orders — place, track status, cancel, request return
  6. Manage inventory — admin adds products, updates stock levels"

Interviewer: "What about product reviews, wishlists, and recommendation engines?"

Candidate: "I'll scope those out. Reviews and wishlists are additive features that don't affect the core transactional model — they'd be separate bounded contexts with their own entities. Recommendation engines require data science infrastructure…

In the full tutorial

  • Phase 2: Object Modeling
  • Phase 3: Class Design & Relationships
  • Phase 4: Design Patterns Application
  • Phase 5: Key Implementation
  • Phase 6: Extensibility & Trade-offs

Glossary history

Click dotted jargon to save explanations here.