Post
Object-Oriented Design Interview: Practice Problems and How to Prepare
How the object-oriented design (low-level design) interview works, a step-by-step approach to answering, the principles and patterns that come up, and practice problems ordered from easy to advanced.
By Codemia • November 14, 2026
6 min read
The object-oriented design interview, often called the low-level design (LLD) round, asks you to model a system as classes: "design a parking lot", "design an elevator system", "design a chess game". Where a system design round is about servers, databases and scale, an OOD round is about the code inside one service: which classes exist, what each one is responsible for, how they talk to each other, and how easy the design is to extend.
It is common at Amazon, Microsoft, Uber and many mid-size companies, and increasingly part of senior loops alongside the system design round. This guide covers how the round works, how to structure an answer, and which problems to practise.
The same problem name can mean different rounds. 'Design a parking lot' in a system design round is about services, storage and scale. In an OOD round it is about classes like ParkingLot, Level, Spot, Ticket and a pricing strategy. Ask the interviewer which they want.
How the round works
A typical OOD round is 45 to 60 minutes. You get a short prompt and are expected to:
- Clarify the requirements and the scope.
- Identify the main objects and their responsibilities.
- Define the relationships between them (has-a, is-a, uses).
- Write class definitions, method signatures and sometimes working code for the core flow.
- Explain how the design handles change: a new vehicle type, a new pricing rule, a new piece in a game.
Interviewers are looking for clean responsibilities, sensible use of interfaces and composition, awareness of design patterns where they genuinely help, and code that would be easy to extend and test.
A step-by-step approach
| Step | Time | What to produce |
| Requirements | 5 min | The core use cases, and what is explicitly out of scope |
| Core objects | 5 min | The nouns in the requirements: a short list of candidate classes |
| Responsibilities and relationships | 10 min | What each class owns and does; a simple class diagram |
| Key flows | 10 min | Walk through the main use cases as method calls between objects |
| Code | 15 min | Interfaces, classes and the core methods in your language |
| Extension | 5 min | How the design handles one or two likely changes |
Find the nouns and verbs. "A driver parks a vehicle in a spot and receives a ticket; on exit, they pay a fee based on duration." Nouns: driver, vehicle, spot, ticket, fee. Verbs: park, pay, exit. That is most of your first class list.
Pick the extension points. Ask where the requirements are likely to change and put an interface there: vehicle types, pricing rules, payment methods, notification channels.
Principles that come up
- Single responsibility: each class has one reason to change. A
ParkingLotshould not calculate fees. - Open/closed: add new behaviour by adding classes, not editing existing ones. A new pricing rule is a new
PricingStrategy, not anotherifbranch. - Liskov substitution: subclasses must work anywhere the parent does. If
Penguin extends Birdbreaksfly(), the hierarchy is wrong. - Interface segregation: small, focused interfaces beat one large one.
- Dependency inversion: depend on interfaces, so you can swap implementations and test in isolation.
- Composition over inheritance: prefer "has a" to "is a" when behaviour varies independently.
Patterns worth knowing
You do not need all 23 Gang of Four patterns. These come up most:
| Pattern | Typical use in interviews |
| Strategy | Pricing rules, payment methods, move validation |
| State | Vending machines, elevators, order lifecycles, traffic lights |
| Observer | Notifications, event subscriptions, UI updates |
| Factory | Creating vehicles, pieces, accounts by type |
| Singleton | A single parking lot or logger instance (use sparingly, and say why) |
| Command | Undo and redo in a text editor; queued operations |
| Decorator | Adding toppings to a coffee order; layering features |
| Composite | File systems, nested menus, shape groups |
Use a pattern when it solves a problem you can name. Naming patterns without a reason reads as memorised.
Practice problems, easy to advanced
Every problem below links to a page in the Codemia object-oriented design catalogue, where you can write your design and get it graded against that problem's key points.
Easy: one or two central ideas
- Parking lot: spot types, tickets and a pricing strategy. The classic first problem.
- Vending machine: the State pattern.
- Tic-tac-toe: board, players and win detection.
- Deck of cards: a generic deck reusable across games.
- Logger: levels, sinks and the chain of responsibility.
- Traffic light system: states and timed transitions.
- Coffee machine: recipes, inventory and the Decorator pattern.
- Bank account system: account types and transactions.
Medium: several interacting objects
- Elevator system: a scheduling strategy and elevator states.
- ATM: states, card authentication and cash dispensing.
- Chess game: piece hierarchy and move validation.
- Library management system: members, loans and fines.
- Hotel booking system: rooms, reservations and availability.
- Movie ticket booking: shows, seats and concurrent booking.
- Car rental system: inventory, reservations and pricing.
- Warehouse management: locations, stock and orders.
Hard: extensibility and tricky behaviour
- Text editor with undo and redo: the Command pattern.
- Spreadsheet: cells, formulas and dependency updates.
- E-commerce cart and checkout: discounts, payment and order states.
- Notification system: channels, templates and the Observer pattern.
- Calendar system: recurring events and conflicts.
- File sharing platform: files, folders, permissions and the Composite pattern.
Advanced: data structures and access control
- LRU cache: a hash map and doubly linked list, often with working code.
- Permission and role system: role-based access control.
- Code editor: buffers, plugins and commands.
- Resource management system: allocation and contention.
A four-step study plan
- Review the principles and patterns above in a day or two. Write a tiny example of Strategy, State and Observer in your interview language.
- Do the easy problems under a 45 minute timer, one per day. Focus on clean responsibilities.
- Move to medium and hard problems. For each, write down the two likely changes and check your design handles them without edits to existing classes.
- Write real code for the core flow on at least half the problems. Many OOD rounds expect compilable code, not just a diagram.
Common mistakes
- Starting with code before agreeing the requirements.
- God classes: one
SystemorManagerclass that does everything. - Inheritance everywhere: deep hierarchies where composition would be simpler.
- Patterns for their own sake.
- Ignoring concurrency in booking problems: two users booking the last seat at once.
Start practising
Begin with the parking lot, then work down the list. If you also have a system design round, see system design practice problems, from easy to hard; for ML roles, see the ML system design interview prep guide.