SOLID is a set of five design guidelines for object-oriented code. Together they help you keep classes focused, extensible, and testable — the properties interviewers look for in an LLD round.
| Letter | Principle | In one line |
|---|---|---|
| S | Single Responsibility | One class, one reason to change |
| O | Open/Closed | Add behavior by extending, not rewriting stable code |
| L | Liskov Substitution | Subtypes must honor the contract callers expect |
| I | Interface Segregation | Depend only on methods you use |
| D | Dependency Inversion | High-level policy depends on abstractions, not concretes |
They are principles, not patterns. Patterns (Strategy, Factory, Observer) are recipes; SOLID is how you judge whether those recipes — or your own types — stay healthy under change.
In interviews you rarely recite the acronym. You use it when asked why a class is split, how a new payment type plugs in, or whether one implementation can replace another.
Next: Single Responsibility.