Other Parts of This Series:

Object Oriented Design (Photo Credit: Coding Ninjas)
What is OOD (Object-Oriented Design)?
Object-Oriented Design (OOD) is the process of designing a system by breaking it down into objects (classes) that interact with each other to solve a problem.
In Simple Terms, OOD is the modeling of real-world problems using objects, behaviors, and relationships.
Key Components of OOD
- Objects: Represent real-world entities like: User, Car, Order
- Classes: Blueprint of objects
- Encapsulation: Hide internal data, expose behavior
- Relationships: How objects interact? Means is it “has-a” (composition) or “is-a” (inheritance)
Goal of OOD
- Manage complexity
- Improve maintainability
- Make system extensible
How Are OOD Interviews Different From Other Interviews?
| Aspect | Coding Interview | OOD Interview |
|---|---|---|
| Goal | Solve problem | Design system |
| Focus | Logic | Structure |
| Output | Code | Classes + relationships |
| Evaluation | Correctness | Design quality |
| Time | Fast solution | Thoughtful design |
What Interviewers Look For in OOD?
- Clear thinking
- Proper abstraction
- Clean class design
- Use of principles (Like: SOLID)
- Communication
- Extensibility
- Balance of Cohesion & Coupling
Difference Between OOD and System Design
| Aspect | OOD | System Design |
|---|---|---|
| Level | Low-level | High-level |
| Focus | Classes | Services |
| Scale | Single system | Distributed |
| Concern | Code structure | Scalability & reliability |
How To Prepare For An OOD Interview?
- Step 1: Master OOP Fundamentals
- Step 2: Learn OOP Principles
- Step 3: Learn Key Design Patterns
- Step 4: Practice Core OOD Problems
- Step 5: Add Advanced Thinking
- Step 6: Practice Communication
- Step 7: Do Mock Interviews
- Step 8: Build Real Projects (Best ROI)
Let’s discuss each step in brief.
Step 1: Master OOP Fundamentals
You must be very comfortable with:
- Encapsulation: Hide internal state and expose only necessary behavior
- Abstraction: Focus on what, not how
- Inheritance: “is-a” relationship
- Polymorphism: Same interface, different behavior
I had some detailed articles on OOP fundamentals. Please read if you are really interested.
Step 2: Learn OOP Principles
Design principles provide high-level guidelines to design better software applications. They do not provide implementation guidelines and are not bound to any programming language. SOLID is a well known design principle term.
I had a detailed article on OOP design principles. Please read if you are really interested.
Step 3: Learn Key Design Patterns
Design patterns provide low-level solutions related to the implementation of commonly occurring object-oriented problems.
I had a detailed article series on OOP design patterns. Please read if you are really interested.
Step 4: Practice Core OOD Problems
Start with:
- Parking Lot
- Elevator System
- Library Management
- Ride Sharing (Uber)
- ATM System
- Notification System
- Movie System
- Vending Machine
- Restaurant Management System
Step 5: Add Advanced Thinking
Once basic design is clear:
- Concurrency
- Scalability
- Fault Tolerance & Recovery
- Persistence
Step 6: Practice Communication
This is critical. Always structure your answer:
- Clarify requirements
- Define use cases
- Identify classes
- Add relationships
- Apply patterns
- Discuss edge cases
I had some detailed articles on presenting and soft skills. Please read if you are really interested.
Step 7: Do Mock Interviews
- Speak out loud
- Time yourself (30–45 mins)
- Explain decisions
Step 8: Build Real Projects (Best ROI)
Learn by doing is the best learning approach. So, practice by build real-world project.
Common Mistakes to Avoid
- Assuming requirements & not asking clarification questions
- Jumping into coding too early
- Overengineering
- Ignoring edge cases
- Not explaining decisions
- Using patterns blindly
- Ignoring advance cases like: concurrency, scalability
- Not discussing future improvement scopes of the solution
OOD Interview Framework
Having a clear framework for the OOD interview is more important than many realize. Without structure, the interview can feel disorganized and difficult for you and the interviewer to follow.
1. Understand & Clarify the Problem (Very First Step)
Goal: Avoid wrong assumptions.
Ask questions like:
- What are the core features?
- Who are the users/actors?
- What are the inputs/outputs?
- Any constraints
Example:
“Are we designing a parking lot for a single building or multiple locations?”
✅ Tips:
- Never jump into coding/design immediately.
- Repeat the problem in your own words.
- Identify functional vs non-functional requirements.
2. Identify Use Cases (Behavior First)
Think in terms of what the system does (verb), not classes (noun) yet.
Example (Parking Lot):
- Vehicle enters
- Vehicle exits
- Assign parking spot
- Calculate fee
✅ Tips:
- Start with happy path, then edge cases.
- Mention at least 1–2 edge cases:
- Full parking
- Invalid ticket
3. Identify Core Entities/Objects (Nouns → Classes)
Extract nouns from the problem.
Example:
- ParkingLot
- Vehicle
- ParkingSpot
- Ticket
✅ Tips:
- Don’t over-design early.
- Keep it minimal and extendable.
4. Define Relationships (Linking)
Think in terms of:
- Association
- Composition
- Inheritance
Example:
- ParkingLot has many ParkingSpots (Composition)
- Vehicle → Car, Bike (Inheritance)
✅ Tips:
- Prefer composition over inheritance unless there’s a strong “is-a” relationship.
- Avoid deep inheritance chains.
5. Define Class Responsibilities (SRP)
Each class should have one clear responsibility.
Example:
- ParkingLot → manages spots
- Ticket → stores entry/exit info
- FeeCalculator → calculates cost
✅ Tips:
- Follow Single Responsibility Principle (SRP).
- If a class is doing too much → split it.
6. Define Key Methods & Interfaces
Now define behavior.
Example:
✅ Tips:
- Keep methods high-level first, refine later.
- Use interfaces for flexibility.
7. Apply Design Patterns (Only When Needed)
Use patterns only when justified.
Common OOD Patterns:
- Factory Pattern → Object creation
- Strategy Pattern → Replace conditional logic
- Singleton → Shared resource (e.g., ParkingLot instance)
- Observer → Event-driven systems
Example:
- Fee calculation → Strategy Pattern
✅ Tips:
- Don’t force patterns.
Say:
“We can use Strategy Pattern here to make fee calculation extensible.”
8. Handle Edge Cases & Constraints (Deep-dive)
Think deeper:
- What if system scales?
- What if concurrency happens?
Example:
- Two cars trying to take the same spot → need locking
✅ Tips:
- Mention thread safety
- Mention data consistency
- Mention failures
9. Persistence (Optional but Strong Signal)
Mention how data is stored:
- In-memory vs DB
- Caching
Example:
- Store tickets in DB
- Cache available spots
✅ Tips:
- Keep it simple (simple language data type like map) unless interviewer pushes deeper.
10. Write Clean Code (If Asked)
Focus on:
- Readability
- Modularity
Example:
11. Walk Through Example
Simulate:
“Car enters → spot assigned → ticket created → exit → fee calculated”
✅ Tips:
- This shows practical correctness.
12. Discuss Trade-offs
This is what senior engineers do.
Example:
- Why composition over inheritance?
- Why Strategy pattern?
Conclusion
OOD interviews are not about perfection, they are about how you think, structure, and evolve a design.
So follow the 4 step rules: Learn → Practice → Explain → Improve.
Further Readings
- Book: Object-Oriented Design Interview by Alex Xu (ByteByteGo)