How to study
Step-by-step OOD interview framework
Use this checklist on every object-oriented design interview question. It is the same shape whether the prompt is a parking lot, an elevator system, or a rate limiter.
How OOD interviews differ from coding interviews
A coding interview grades whether your algorithm is correct and fast. An OOD interview grades something closer to judgment: can you turn a vague prompt into a set of classes that model the real system, stay easy to extend, and hold up when the interviewer adds a requirement mid-conversation. There is rarely a single correct answer - two candidates can both pass with different class layouts, as long as each decision maps back to a real requirement and the candidate can defend it. That is why interviewers weigh how you decompose the problem and communicate tradeoffs at least as heavily as the diagram you end up with.
Common OOD interview prompts
Most OOD prompts are one of a small number of "model a real-world system" shapes: a parking lot or garage, an elevator system, a vending machine, an ATM, a library or book-lending system, a ride-sharing dispatcher, a hotel or restaurant reservation system, a chess or other board game engine, a deck of cards for a game engine, or a rate limiter / cache with a swappable eviction policy. A chess engine is worth practicing on its own: it forces you to model a board, pieces with different movement rules, and turn-based state transitions, which exercises inheritance and polymorphism harder than most of the other prompts on this list. Different prompt, same seven steps below - start with Design a Parking Lot, a fully worked example, if you want to see the framework applied end to end before you hit one of these cold.
Step 1: Clarify requirements and scope
Ask what the system must do (core use cases) before naming a single class. Confirm scale (single machine or distributed?), who the users/actors are, and what is explicitly out of scope. Skipping this step is the most common way to design the wrong thing well.
Step 2: Identify the core entities (nouns)
List the real-world objects the system needs to model, the nouns in the problem statement. For a parking lot: Vehicle, ParkingSpot, Ticket, Level. Do not model everything; only what the use cases in Step 1 require.
Step 3: Identify the actions (verbs) and assign responsibilities
For each use case, ask which entity is responsible for each action. This is the single-responsibility check: each class should own one clear piece of behavior, not become a catch-all.
Step 4: Define relationships between classes
Decide composition vs. inheritance vs. mixins, and cardinality (one Level has many ParkingSpots; one ParkingSpot has at most one Vehicle at a time). Composition ("has-a") is the default; reach for inheritance only for a genuine "is-a" relationship, and for a mixin when you need to share one piece of behavior (like Loggable or Comparable) across otherwise unrelated classes without forcing a false "is-a" link. Draw it, since a quick box-and-arrow diagram communicates more than a paragraph of description: a plain line is an association, a line with an open diamond is aggregation (a Level references ParkingSpots that can outlive it), a filled diamond is composition (a Ticket's line items don't exist without the Ticket), and a label like "1" or "0..*" at each end states the cardinality so the interviewer doesn't have to ask.
Step 5: Design for extensibility
State explicitly what should be easy to add later without rewriting the core: new vehicle types, new payment methods, new spot types. Favor interfaces and abstract base classes at the seams where variation is expected (a strategy pattern for payment, a factory for spot allocation), but do not over-engineer variation nobody asked for.
Step 6: Walk through the use cases against your design
Trace two or three concrete scenarios through your class diagram end to end (a car enters, finds a spot, pays, leaves). This surfaces missing methods and awkward relationships before the interviewer has to point them out.
Step 7: Handle follow-ups
Common follow-ups include concurrency (two threads claiming the same spot needs locking or an atomic reservation), persistence (where does state live if the process restarts?), and API design (what would the public interface of this class look like to a caller?).
What interviewers are actually evaluating
Six things are being scored underneath the seven steps, and it helps to know them by name instead of just producing a diagram and hoping it lands. Product sense is whether you translated a vague prompt like "design a parking lot" into the right set of real-world use cases before naming a class. Systems thinking is whether your entities and relationships in Steps 2-4 actually decompose the problem, rather than one giant class doing everything. Decision-making shows up in Step 5: did you extend the design where extension was actually likely, or add a factory and a strategy pattern nobody asked for. Code quality is whether the class names, method names, and responsibilities would survive a real code review, not just whether the diagram is internally consistent. OOP knowledge is fluency with encapsulation, abstraction, inheritance, and polymorphism applied correctly to your own design, not recited as definitions. Communication is graded throughout, not at the end: narrating a tradeoff out loud when you pick composition over inheritance is worth more than getting to the same diagram in silence. A design that is technically fine but arrived at silently, or over-engineered for variation nobody requested, scores worse than a simpler design the candidate can defend line by line.
The four principles interviewers expect you to know by name
You do not need a textbook definition, but you should be able to point at your own design and name which principle a decision serves. Encapsulation means each class hides its internal state behind methods, so a ParkingSpot decides for itself whether it is available rather than exposing a raw boolean anyone can flip. Abstraction means callers depend on what a class does, not how it does it, which is why a PaymentProcessor interface matters more than any single payment method underneath it. Inheritance models a genuine "is-a" relationship, a CompactSpot is a ParkingSpot, and gets misused constantly when candidates reach for it to share code between classes that are not actually related. Polymorphism lets you treat different spot types or vehicle types through one shared interface, so a Level can hand out spots without a chain of type checks.
SOLID, and how to actually use it in an interview
Interviewers reference SOLID more than they define it, so knowing the five letters by name matters less than being able to point at your own diagram and say which one a decision serves. Single responsibility means each class has exactly one reason to change: a ParkingSpot that tracks occupancy and calculates the fee is doing two jobs, split the pricing logic into its own class and the spot only has to change when parking rules change, not when pricing does. Open-closed means a class should be open to extension but closed to modification, which is the entire justification for the factory and strategy patterns below, adding a new vehicle type or payment method should mean writing a new class, not editing an existing one and risking what already works. Liskov substitution means a subclass has to be usable anywhere its parent is expected without breaking the caller's assumptions, which is the concrete test for whether an "is-a" relationship is real: if CompactSpot overrides a method in a way that surprises code written against ParkingSpot, the inheritance is wrong even if it compiles. Interface segregation means callers should not be forced to depend on methods they never use, a single fat Vehicle interface with methods for cars, motorcycles, and trucks forces every implementation to stub out what does not apply, smaller focused interfaces avoid that. Dependency inversion means high-level modules should depend on abstractions, not concrete classes, which is why ParkingLot should hold a PaymentProcessor interface rather than a concrete CreditCardProcessor, the same reason the strategy pattern below works at all. You will rarely be asked to recite these five definitions, but naming the one your design decision maps to, unprompted, is a stronger signal than any diagram.
Common OOD patterns worth knowing by name
Interviewers rarely ask you to name a pattern outright, but using the right one, and being able to say why, is what separates a design that just works from one that reads as intentional. A factory pattern fits anywhere you are creating one of several related object types (a spot factory that returns a CompactSpot, LargeSpot, or HandicapSpot based on input) without the caller needing to know the concrete class. A strategy pattern fits swappable behavior, most often payment methods or pricing rules, where the interface stays fixed but the implementation behind it changes. An observer pattern fits notification-style requirements, like alerting a display board when a level fills up, without the Level class needing to know who is listening. A singleton fits a genuinely single shared resource, like a central ParkingLot instance, though it is worth naming the tradeoff (harder to test, a hidden global dependency) rather than reaching for it by reflex.
Mistakes that cost candidates the round
The most common failure is not a wrong class diagram, it is skipping Step 1 and diving straight into class names before confirming what the system actually needs to do, which produces a technically fine design for the wrong problem. A close second is over-engineering: adding an interface, a factory, and a strategy pattern for a variation the interviewer never asked about, which reads as pattern-matching rather than judgment. The third is staying silent while drawing. Interviewers are grading how you think as much as what you produce, so narrate the tradeoff out loud when you choose composition over inheritance instead of just writing it down.
Practice under real conditions
Reading a worked example teaches you the pattern; it does not teach you the interview. Once you understand a prompt like the parking lot, close the solution and redo it from Step 1 with a blank page and a 30-35 minute timer, narrating out loud the whole time, not just when you get stuck. Writing full compilable code is not the point and most interviewers won't ask for it: class signatures, method names, and the relationships between them (composition, inheritance, which pattern and why) are what gets graded, so don't burn your clock implementing method bodies nobody will read. If you can, trade prompts with another candidate and interview each other; being asked a genuine follow-up you didn't anticipate, and having to defend a decision on the spot, is a different skill from rehearsing a prompt you already know the answer to.
FAQ
What is OOD in software engineering?
OOD stands for object-oriented design: taking a real-world system and modeling it as a set of classes, each owning its own data and behavior, that interact through defined relationships. In an interview, it means turning a prompt like "design a parking lot" into class names, responsibilities, and relationships using the seven-step process above, not writing runnable code end to end.
What is the difference between an OOD interview and a system design interview?
A system design interview asks how a system scales across machines: load balancers, databases, caching, and message queues for something like a URL shortener or a news feed. An OOD interview asks how a system is modeled in a single process, or on a single machine: which classes exist, what they are responsible for, and how they relate. Some prompts blend both (a ride-sharing dispatcher can be asked either way), but the core skill being graded, distributed infrastructure versus class design, is different.
How many OOD questions should I practice?
Fewer than coding questions, but each one in more depth. Five to eight well-practiced prompts, spanning a physical system (parking lot, elevator), a transactional system (ATM, vending machine), and a service-style system (rate limiter, notification system), cover the shapes interviewers actually reuse. Redoing the same prompt with a stricter time limit teaches more than rushing through ten different ones.
What is SOLID in object-oriented design?
SOLID is a set of five principles (single responsibility, open-closed, Liskov substitution, interface segregation, dependency inversion) that describe what a well-structured class design looks like. Interviewers rarely ask you to define them, but they grade whether your design honors them: one class per responsibility, new behavior added through new classes rather than edits to existing ones, and dependencies on interfaces rather than concrete implementations. See the section above for what each one means against a real example.
Is OOD asked at every company?
No, it shows up most often at companies that build complex backend systems and want to see design judgment before a candidate reaches a system design round: think Amazon, Apple, and Oracle-style enterprise interview loops. Pure algorithm-heavy interview processes may skip it entirely, so confirm with your recruiter or check the company tags on the questions in this bank before you allocate practice time.
What do cohesion and coupling mean in an OOD interview?
They're the two properties Step 3's single-responsibility check and Step 4's relationship choices are actually optimizing for. High cohesion means a class's methods and data all serve one clear purpose, a ParkingSpot that only tracks occupancy and spot type is highly cohesive; one that also calculates fees and sends notifications is not. Low coupling means classes depend on each other through narrow interfaces rather than reaching into each other's internals, which is why Step 5 favors a PaymentProcessor interface over a concrete class. Naming these two terms when you justify a design decision, "I kept pricing in its own class to keep ParkingSpot cohesive", signals the same judgment interviewers are scoring in Steps 3 and 4, just with the vocabulary they expect.
Do I need to write full, runnable code in an OOD interview?
Rarely, and trying to is a common way to run out of time. Most loops grade class names, method signatures, and the relationships between classes, sketched as pseudocode or a lightweight diagram, over a fully compilable implementation. Spend your time on Steps 1-5 (scope, entities, responsibilities, relationships, extensibility) and only write real method bodies if the interviewer explicitly asks for one to be implemented, usually to check a specific tricky bit like concurrency handling.
Related reading
- How to approach OOD interviews: the condensed version of this framework.
Each question below includes its own step-by-step study guide. Read the guide first, then try the problem before you reveal the full solution.
OOD Interview Questions
Object-oriented design interview questions: parking lots, elevators, and real-world modeling.
Practice object-oriented design (OOD) interview questions with class diagrams, extensibility patterns, and follow-ups from real onsite loops.
Showing 1 of 1 questions