Design a parking lotOO designModel a multi-floor parking lot with spot types for motorcycles, cars and trucks: park, unpark, find free spots, and charge by time.
Last asked Oct 2026
+1
Design a chess gameOO designModel a two-player chess game: board, pieces and their moves, turns, check, checkmate and stalemate, and special moves like castling.
Last asked Sep 2026
Checkout price engine with pluggable discountsOO designBuild the price engine for an e-commerce checkout. A cart holds line items (product id, unit price, quantity) and the customer has a tier, standard or premium. Apply discounts of…
Last asked Sep 2026
Design a shopping cart (object-oriented)OO designWrite a small, runnable object model for an online store's shopping cart in the language of your choice: adding products, the other everyday cart operations, and computing the…
Last asked Sep 2026
Design a pizza price calculatorOO designModel pizzas with sizes, crusts and toppings, plus deals and coupons, and compute the price of an order. Make it easy to add new toppings and promotions.
Last asked Sep 2026
Concurrent restaurant waitlist and seatingOO designDesign and code a restaurant's waitlist and seating: parties join the list, tables free up, and parties get seated. Keep it correct when many requests happen at the same time.
Design a snake gameOO designDesign the snake game in object-oriented code: the board, the snake, food, moving, growing, and detecting collisions.
Last asked Jun 2026
Design a library management systemOO designModel books, copies, members, loans, holds and fines for a library, with search and limits on loans per member.
Last asked Jun 2026
+1
Design a voting systemOO designModel polls with options, voters and ballots: cast one vote per voter, change it before closing, and tally results.
Last asked May 2026
Extensible cinema ticket pricing engineOO designDesign a ticket pricing engine for a cinema, built so that new pricing rules can be added later without rewriting the engine.
Last asked May 2026
+2
Design an elevator control systemOO designModel a bank of elevators: hall and car requests, a dispatching strategy, direction and door states, and capacity limits.
Last asked Apr 2026
In-memory pub/sub with prioritiesOO designDesign and code a publish/subscribe system that runs on one machine: topics, subscribing, unsubscribing and publishing. Follow-up: messages carry a priority and higher-priority…
Last asked Apr 2026
Deck of cards with shuffle, draw and sortOO designModel a deck of playing cards with classes for cards and the deck. Implement a fair shuffle (every order equally likely, Fisher-Yates), drawing cards, and putting the deck back in…
Last asked Mar 2026
Assign dorm rooms by student preferenceOO designYou get student IDs and room IDs. Each student prefers a two-person room or a four-person room. Design a system that assigns students to rooms according to their preferences. The…
Last asked Feb 2026
Extensible employee cost calculatorOO designDesign the classes for a calculator that works out what employees cost the company. Different kinds of employees are costed differently, and new kinds or cost components will be…
Last asked Feb 2026
Cart and pricing engine for a food delivery orderOO designIn a food delivery marketplace, an order's final price is more than the sum of its menu items: item customizations such as extra toppings and sizes change it, and so do other…
Last asked Jan 2026
Design a poker gameOO designDesign the classes for a poker game: cards, deck, players, hands, betting rounds, and deciding the winner. Show the main methods, how a round flows from deal to showdown, and how…
Last asked Jan 2026
Design Amazon Locker (object-oriented)OO designModel a locker location with compartments of several sizes: assign a package to a compartment that fits, issue a pickup code, and handle expiry and returns.
Last asked Jan 2026
Design Amazon Kindle (object-oriented)OO designModel an e-reader library: buy and download books, keep several formats, track reading position across devices, and support highlights.
Last asked Jan 2026
Design a basic credit card systemOO designDesign the classes for a simple credit card system: cards and accounts, a credit limit, purchases, payments and the balance. Show how a purchase is authorized against the limit…
Last asked Oct 2025
+1
Design tic-tac-toeOO designModel an N-by-N tic-tac-toe game for two players: moves, turn order, and detecting a win or draw efficiently after each move.
Last asked Oct 2025
Design a wallet with holds and payoutsOO designDesign and code a wallet for a rental platform. Users keep a balance; money can be put on hold (for example when a booking is made), then captured or released, and hosts receive…
Last asked Sep 2025
Memory usage switcher with configurable thresholdsOO designDesign and code an in-memory switcher that watches memory usage and switches between states (or targets) when usage crosses thresholds the caller can configure. Cover how…
Last asked Sep 2025
Keyboard and mouse input systemOO designDesign classes for an input system that records what a user does with the keyboard and the mouse (key presses, clicks, movement) so that the program can tell what was input…
Last asked Sep 2025
Filter and analyze logs with an object-oriented designOO designDesign classes that read a stream of log entries, some of them errors, filter them by rules such as level, time range or source, and report simple analytics such as error counts…
Last asked Sep 2025
Configuration store with subscriber notificationsOO designDesign classes that let a system set configuration values while applications subscribe to the settings they care about. When a value changes, every subscriber of that setting is…
Last asked Sep 2025
Extensible event ticketing systemOO designWrite an EventTicketSystem that sells tickets for different kinds of events, such as concerts, movies and sports games. Adding a new kind of event later should not require…
Last asked Sep 2025
Design a traffic light control systemOO designModel an intersection's traffic lights with phases and timings, pedestrian requests and an emergency override, as a clear state machine.
Last asked Sep 2025
Design a restaurant reservation serviceOO designModel restaurants, tables, time slots and reservations: search availability, book, modify and cancel, and avoid double-booking a table.
Last asked Sep 2025
Design Unix file searchOO designModel a find-like file search over a directory tree with composable filters (name pattern, size, type, extension) that are easy to extend.
Last asked Aug 2025
Delayed job schedulerOO designDesign and code a scheduler that accepts a job and a delay and runs the job after that many seconds. Cover the data structure that finds the next due job, the worker thread or…
Last asked Aug 2025
Thread-safe document and tag classesOO designDesign classes that record documents and the tags on them: add and remove tags, list a document's tags, and find documents by tag. Follow-up: many threads use it at once; make it…
Last asked Aug 2025
Design an ATMOO designModel an ATM: card and PIN authentication, balance inquiry, withdrawal with a cash dispenser of fixed denominations, deposit, and failure handling.
Design a vending machineOO designModel a vending machine with products, slots, coins and notes: select, pay, give change and handle sold-out items, using clear states.
Design a coffee makerOO designModel a coffee machine with recipes, ingredient containers and brewing steps; refuse drinks when ingredients run low and make adding recipes easy.
Design a blackjack gameOO designModel a blackjack table with a dealer, players, a shoe of decks, bets, hit/stand/double/split, and payouts.