Cohesion and coupling
Two measures of modular design. Cohesion is how closely the parts of one module serve a single purpose; coupling is how much modules depend on each other. High cohesion, low coupling is the aim.
Cohesion and coupling are paired measures of how well software is divided into modules, formalised in the structured design work of Larry Constantine and colleagues, notably a 1974 IBM Systems Journal paper with Wayne Stevens and Glenford Myers. Cohesion describes how closely the elements inside one module belong together: a highly cohesive module does one well-defined job. Coupling describes how much one module depends on the internals of another: loosely coupled modules interact only through narrow, defined interfaces. Good design aims for high cohesion and low coupling.
The pairing matters for security as well as maintenance. A cohesive module with a single purpose is easier to review, test and reason about, which helps secure code review and static analysis. Low coupling limits how far a change or a flaw in one module spreads to others, and it supports isolation and least privilege between components, because each module needs access to less. Both ideas fit naturally with object-oriented programming and with abstraction, where modules talk through interfaces rather than through each other’s internal data.
Exam relevance: questions in this area tend to ask which combination is desirable. Candidates are expected to answer high cohesion with low coupling, and to take care not to reverse the two.