How parts fit together

A kitchen that keeps baking tools together has high cohesion: related things are grouped. If replacing the coffee machine does not affect the oven, those appliances have low coupling.

In software, a cohesive module has a focused purpose. Loosely coupled modules communicate without relying on each other’s internal details.

Some connection is necessary

Software parts must work together. The goal is to make their dependencies clear, so changing one part does not unexpectedly break others. Splitting related work too far lowers cohesion and can make simple tasks more complicated, especially when parts must communicate over a network.