All cheat sheets
📦

OOP Concepts

Pillars, SOLID, and how to explain design in interviews.

Four Pillars

EncapsulationHide internals; expose clean interfaces (getters/setters, modules).
AbstractionShow essential features; hide complexity (interfaces/abstract classes).
InheritanceIS-A reuse; prefer composition when hierarchies get deep.
PolymorphismSame interface, different implementations (override / overload).

SOLID (quick)

S — SRPSingle Responsibility: one reason to change.
O — OCPOpen for extension, closed for modification.
L — LSPSubtypes must be substitutable for base types.
I / DInterface segregation · Depend on abstractions (DIP).