Skip to main content
PreparationZone Logo
PrepZone

SOLID as Diagnostic Questions

Five questions to ask about every class — with interview framing, not textbook definitions.

Pass checkpoint below

Why this matters

  • SRP smell — detailed pointwise breakdown in the section below.
  • OCP smell — detailed pointwise breakdown in the section below.
  • LSP smell — detailed pointwise breakdown in the section below.
  • ISP smell — detailed pointwise breakdown in the section below.
  • SOLID is scored as refactor skill, not acronym recall.
Single responsibilityOne reason to change
Open / closedExtend, do not edit
Liskov substitutionSubtype keeps the promise
Interface segregationSmall, focused contracts
Dependency inversionDepend on abstractions
ResultSwappable, testable units
Read them as questions about a single class: does it have one job, can I extend it without editing it, and does it depend on contracts rather than concrete types?

Overview

Five questions to ask about every class — with interview framing, not textbook definitions. Study each section below in order — every list is interview-ready reference material.

SRP smell

Points to cover

  • Definition — what SRP smell means in one clear sentence
  • When to use — the force or smell that triggers this concept
  • CampusOS example — where this appears in parking, booking, or library modules
  • How to explain — pointwise bullets you can say aloud in an interview
  • Common mistake — what weak candidates do instead
  • Refactor move — one concrete change that improves the design

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 4 sections

  • OCP smell
  • LSP smell
  • ISP smell
  • DIP smell

Test yourself

Answer these before moving on — recall is what makes it stick.