An Example (continued)
-----------------
|control program|(procedural cohesion)
-----------------
|
----------------------------------------------------------
| | |
--------------- ---------------- -------------------
|access the | | dispatcher |(logical |print bonus check|
|database and | ----------------cohesion) -------------------
|compile | | | | (functional cohesion)
|statistics | -------- ---------- ----------
--------------- | 10% | | 5% | | 2% |
(logical | bonus| | bonus | | bonus |
cohesion) -------- ---------- ----------
(functional cohesion)
The coupling between the control module and its
subordinate modules is usually data coupling or stamp coupling,
depending upon whether parameters are passed (data coupling) or
structures are passed (stamp coupling).
However the coupling between the control module and
the dispatcher also can be control coupling (control flags are passed).
The coupling between the dispatcher and its subordinate
modules is usually data coupling.