Tier: 4 — Hard Domain: Aviation / Travel Booking Core Patterns: State (flight/booking lifecycle), Strategy (seat pricing), Observer (notifications), Factory (seat creation)
Phase 1: Requirements & Use Cases
Interviewer: "Design an airline management system."
Candidate: "Let me make sure I understand the scope. I'm thinking of a system that manages flights, seat inventory, and passenger bookings — something like what an airline's internal reservation system would need. Are we covering the full booking lifecycle: searching flights, reserving seats, issuing tickets, check-in, and cancellation?"
Interviewer: "Yes. What else do you want to confirm?"
Candidate: "A few things. First — do we need crew scheduling and aircraft maintenance, or just passenger-facing booking? Second — do we need loyalty program integration or just standard fares? Third — multi-leg itineraries or single-segment flights? Fourth — are we persisting to a database or modeling the domain layer only?"
Interviewer: "Focus on passenger booking — no crew or maintenance. Standard fares only. Single-segment flights for now. Domain model only."
Candidate: "Perfect. The actors are:
Passenger(the traveler searching and booking),Airline(managing flights and aircraft), andBookingAgentor automated system (orchestrating the booking flow). The core use cases are: (1) search available flights by origin, destination, and date; (2) select a flight and reserve a seat; (3) issue a booking/ticket; (4) check in for a flight; (5) cancel a booking and trigger refund eligibility; (6) update flight status — delays, cancellations. Out of scope: crew management, aircraft maintenance, loyalty miles, multi-leg routing, and payment gateway integration."Interviewer: "What about seat upgrades?"
Candidate: "I'd keep…
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