🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Cohesion

In plain terms

How focused and related the responsibilities within a module are.

Going deeper

High cohesion means a module does one well-defined thing, making it easier to understand and maintain. Low cohesion mixes unrelated tasks. Good design pairs high cohesion with low coupling.

Under the hood

High cohesion (functional) is the goal; low cohesion (coincidental, logical) signals a class doing too much. Pairs with low coupling for maintainability.

Examples

A class that only handles invoices, single-purpose modules, focused functions.

Think of it like...

Like a well-organized toolbox where each drawer holds one kind of tool, rather than a junk drawer of unrelated odds and ends.

Feedback & Bug Report