Junior
From PDF
SOLID
Design Patterns & SOLID
What is the difference between Cohesion and Coupling?
Short answer: Cohesion: Degree to which elements of a module belong together. High cohesion means focused, well-defined responsibilities. Coupling: Degree of interdependence between modules. Low coupling means modules are independent and changes in one don’t affect others.
Real-world example (ShopNest)
Patterns in ShopNest should solve a real pain (swappable payments, test seams)—not be added for decoration.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png