Skip to main content

Command Palette

Search for a command to run...

OOD Interviews: Stop Guessing Classes—Identify Core Entities Like a Pro

Updated
2 min read
OOD Interviews: Stop Guessing Classes—Identify Core Entities Like a Pro

OOD Interviews: Stop Guessing Classes—Identify Core Entities Like a Pro

Class identification diagram

In object-oriented design (OOD) interviews, hiring managers rarely want clever one-liners — they want to see that you can reliably find the domain's core entities and justify their responsibilities. Instead of guessing classes, use a repeatable process to identify the objects that own both data and behavior (e.g., Product, Order, Member).

Why this matters

  • Interviewers assess your ability to model a domain, not memorized class names.
  • Clear entities + single, well-justified responsibilities = maintainable, testable code.
  • Demonstrates understanding of SRP (Single Responsibility Principle) and relationships between objects.

A simple, systematic approach

  1. Understand the domain: ask clarifying questions. What are the business goals, flows, and constraints?
  2. Extract candidate entities: scan requirements for nouns (Book, Member, Loan, Product, Order). Treat nouns as seeds, not final answers.
  3. Assign responsibilities: give each candidate one primary reason to change. If a class has multiple unrelated duties, split it.
  4. Define relationships: decide associations (e.g., Member has many Loans; Loan references a Book). Model multiplicity and ownership.
  5. Iterate: refine as you uncover new requirements or edge cases.

Example (library system)

  • Nouns: Book, Member, Loan, Catalog
  • Responsibilities:
    • Book: metadata and availability logic
    • Member: contact info, borrowing limits
    • Loan: due date, renew, return behavior
  • Relationships: Member 1..* Loan; Loan -> Book

Interview tips

  • Talk your process out loud—explain how you found nouns and assigned responsibilities.
  • Use SRP as a guiding rule to split or merge classes.
  • Draw a quick class/relationship diagram and walk through typical use cases.
  • Admit assumptions and show how your model adapts when requirements change.

Focus on discoverability and rationale, not a perfect diagram. If you can consistently identify core entities and justify why each exists and what it does, you'll stand out in OOD interviews.

More from this blog

B

bugfree.ai

340 posts

bugfree.ai is an advanced AI-powered platform designed to help software engineers and data scientist to master system design and behavioral and data interviews.