Fundamentals · Medium · Free
What is coupling vs cohesion? Why do interviewers care?
FresherFundamentalsOOP & Language Fundamentals
Coupling vs cohesion
Cohesion = how focused a module is (high = one job). Coupling = how much modules depend on each other (low = change in one doesn't break others).
- High cohesion:
InvoiceCalculatoronly calculates totals. - Low coupling: controller calls service interface, not raw SQL.
- God classes = low cohesion + high coupling—refactor smell.
Interviewers want high cohesion, loose coupling—say it and give a microservice vs monolith example.