In computer programming, cohesion refers to the degree to which the elements inside a module belong together.
In contrast, low cohesion is associated with undesirable traits such as being difficult to maintain, test, reuse, or understand.
[2] The software metrics of coupling and cohesion were invented by Larry Constantine in the late 1960s as part of Structured Design, based on characteristics of “good” programming practices that reduced maintenance and modification costs.
[4] In a highly cohesive system, code readability and reusability is increased, while complexity is kept manageable.
Cohesion is a qualitative measure, meaning that the source code is examined using a rubric to determine a classification.