Cohesion Categories

Temporal

A Module performs more than one function, and these are related by the fact that they must occur within the same time span.

Alias:  Classical

Example

Any single module program.  For example a one-module command line program.
Modules performing program initialization, termination, housekeeping and clean-up .

Advantages

Good for small command line programs (under 500 lines of source).

Good for small programs (under 1000 lines of source) that are expected to have little or no maintenance.

Disadvantages

If not a small command line program, changes to this module may cause a ripple effect necessitating the change of modules that are not using the new functionality.

This ranks above logical cohesion because all of the elements are executed at each invocation.

Note

A constructor method of a class does not necessarily exhibit temporal cohesion.  A well defined constructor has a definite purpose to initialize the attributes of the class and all of the elements are directed to that purpose.

Back Home Up Next

© Carl J. Mueller, 2001.

 This page was last update on  04/17/2001