26 live Object-Oriented Design scenarios
Object-Oriented Design Interview Questions
Medium Scenarios
21 challengesDesign an Airline Management System
Design an airline domain model covering airports, aircraft seat layouts, scheduled flights versus dated flight instances, passengers, reservations and tickets, seat assignment, and flight status transitions.
Implement an In-Memory Rate Limiter
Design and implement an in-memory rate limiter as an object-oriented TypeScript module, with handwritten tests and discussion of concurrency considerations.
Design an ATM Transaction Engine
Design an ATM that authenticates a card and PIN, and supports balance inquiry, cash withdrawal with denomination dispensing, and deposits, including session/state handling and hardware abstractions.
Design Blackjack and a Deck of Cards
Design a reusable deck of cards and a single-round Blackjack game: cards, suits and ranks, deck shuffle/deal, hand scoring with flexible ace values, player and dealer turns, and terminal outcomes (blackjack, bust, win/lose/push).
Design a Power Plant Electricity Allocator
Design a class-level system modeling a power plant that distributes electricity to multiple neighborhoods, each with a stated demand, subject to the plant's total capacity.
Design a Car Rental System
Design a car rental domain model covering vehicle categories and vehicles, branches, customers and drivers, a rental date range, rate-based quotes, reservations, pickup rental agreements, and return inspection with extra charges โ preventing overlapping rentals of the same vehicle.
Design a Group Expense-Splitting Ledger
Design a system where users form groups, log shared expenses using pluggable splitting strategies (equal/exact/percentage), maintain pairwise balances, and settle debts.
Design a Hotel Management System
Design a hotel domain model covering room types and rooms, guests, a half-open date-range value object, the reservation lifecycle, room assignment, check-in/out, and a charges folio, while preventing overlapping bookings on the same room.
Design a Library Management System
Design a library that models catalog titles versus physical copies, members and librarians, checkout/return/renew/reserve flows with loan due dates, an overdue fine policy, and notifications as a boundary.
Design a Meeting Room Booking System
Design a class-level system for booking meeting rooms: register a room, book a meeting given a start time and duration, and cancel an existing meeting with correct conflict detection.
Design an Online Shopping System
Design an online shopping domain model covering the product catalog, SKU inventory, shopping cart, order lines with snapshotted prices, a checkout flow, a payment boundary, and shipment state transitions.
Design a Multi-Floor Parking Lot
Design a parking lot that assigns compatible spots across multiple floors, issues tickets, tracks capacity, and calculates payment when vehicles exit.
Design a Professional Networking Platform
Design a professional networking domain model covering members and profiles (experience/education), connection requests and undirected connections, and posts with comments and reactions, enforcing symmetric connections, no self-connection, unique pending requests, and profile-edit authorization.
Design a Question and Answer Platform
Design a Q&A platform domain model with users, questions, answers, comments, tags, votes, an accepted-answer rule, and a reputation policy, with the voting, acceptance, and reputation invariants enforced in the model.
Design a Restaurant Management System
Design a restaurant domain model covering tables and capacity, reservations for time slots, seated parties, a menu, orders with priced line items, kitchen status, and bills with payments, keeping booking and order/kitchen state transitions correct.
Design a Multi-Device Smart Home Controller
Design an application that controls multiple smart-home device types (e.g., fan, TV) supporting generic ON/OFF commands common to all devices plus device-specific commands, extensibly.
Design a Social Networking Platform
Design a social networking domain model covering users and profiles, friendship requests and symmetric friendships, and posts with a visibility policy, comments, and reactions โ enforcing symmetric friendship, unique requests, author ownership, and visibility-based read authorization.
Design a Vending Machine Controller
Design a vending machine that manages inventory, accepts money, supports product selection and cancellation, returns change, and enforces a clear transaction state machine.
Design an Expense Management System
Model the core domain objects, state transitions, approval policies, and audit history for an employee expense management system.
Design a Role-Based Password Validator
Design an extensible validator that applies different password policies to regular users, administrators, and super administrators.
Design a Rare Book Condition Management System
Model the core domain objects for tracking physical condition assessments of rare library books, with immutable scan history and structured condition report generation.
Hard Scenarios
5 challengesDesign a Two-Player Chess Game Engine
Design a chess engine that models a board and pieces, validates legal turns and moves, records move history, and detects check, checkmate, stalemate, resignation, and forfeit.
Design a Cricket Information Platform
Design a cricket scoring domain model covering teams and players, a match, innings, overs and deliveries, batting and bowling scorecards, extras and wickets, striker rotation, over completion, and match results for a configurable limited-overs format.
Design a Multi-Elevator Dispatch System
Design a controller for multiple elevators that accepts hall and cabin requests, schedules cars, models movement and doors safely, and supports replaceable dispatch policies.
Design a Movie Ticket Seat Booking System
Design a multi-theater ticket booking system where users search movies/showtimes, pick specific seats from a shared seat map, and complete a reservation with correctness under concurrent booking attempts.
Design an Online Stock Brokerage System
Design a brokerage domain model covering accounts and portfolios, instruments, a cash ledger, market and limit orders, immutable fills, derived positions, order state transitions, and an external exchange gateway boundary โ without building a matching engine.
