Tier 1 · Foundations

Core Concepts

OOP Pillars

SOLID Principles

Creational Patterns

Structural Patterns

Behavioral Patterns

Tier 2

Tier 3

Tier 4

Tier 5

Phase 1: Requirements & Use Cases

Interviewer: "Design a Blackjack game."

Candidate: "Sure. Let me confirm scope. I'm thinking of a single-table Blackjack game: one or more players compete against a dealer. Each player tries to build a hand worth as close to 21 as possible without going over. The dealer follows fixed rules — hit on 16 or below, stand on 17 or above. A natural blackjack (Ace + 10-value card in the first two cards) beats a regular 21. Does that match your intent?"

Interviewer: "Yes. What clarifying questions do you have?"

Candidate: "A few important ones. First — how many players? Is it configurable? Second — are we modeling a Shoe (multiple shuffled decks, casino standard) or a single deck? Third — which player actions should we support: just hit and stand, or also split and double down? Fourth — are we modeling betting and payouts, or just win/loss tracking?"

Interviewer: "Up to 4 players, single deck for simplicity, support hit/stand/double-down, and model betting with chip counts."

Candidate: "Got it. The actors are: Player (makes decisions, places bets), Dealer (follows fixed rules, manages the shoe/deck), and BlackjackGame (orchestrates the game loop). Core use cases: (1) start a round — all players place bets; (2) deal initial two cards to each player and dealer; (3) player turn — each player chooses hit, stand, or double-down; (4) dealer turn — dealer draws until standing threshold is reached; (5) evaluate outcomes — compare each player's hand to dealer, resolve payouts; (6) detect naturals — a two-card 21 pays…

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
  • Executive Summary

Glossary history

Click dotted jargon to save explanations here.