Modularity and Software Cost
As the number of modules increases, the implementation cost per module decreases
because the modules become simpler.
But at the same time the interface cost per module increases
because there are more modules to control and communicate with.
As a result, we cannot say more modules always lead to better design.
There is an "optimal" region of minimum cost.
Cohesion
Cohesion is a measure of the relative functional strength
of a module, or the degree to which a module performs a single,
isolated task.
Low cohesion is bad, high cohesion is good
Coincidental cohesion (scatter-brained)
Logical cohesion (functions logically related)
Temporal cohesion (functions temporally related and constrained)
Procedural cohesion (functions must be executed in fixed order)
Communicational cohesion (sequential functions concentrate on one specific area of software data structure)
Informational cohesion (all functions concentrate on one specific area of software data structure)
Functional cohesion