Tuesday, April 21, 2009

Functional Decomposition

The documentation tool for structured design is the hierarchy lure chart. It is a graphic tool for representing hierarchy, and it elements:

   1. The module is represented by a rectangle with a name It is a contiguous set of statements.
   2. The connection is represented by a vector linking two modules. It usually means one module has called another module. 
   3. The couple is represented by an arrow with a circular tail. It represents data items moved from one module to another. In Likewise, module A calls C, passing P downward and receiving Q back. More on coupling is described next.

In the functional decomposition approach to structured design, software is partitioned into independent modules so that each module is small enough to be manageable. In the evaluation of a program module, two criteria are considered: the module's connections to other modules, called coupling, and its intramodule strength, or cohesion.

Module coupling refers to the number of connections between a "calling" and a "called" module and the complexity of these connections. There must be at least one connection between a module and a calling module. A design objective for producing an easily understood code is to make the modules as independent as possible. For example, in which is the calling module. In this case, we have coupling.

Module cohesion refers to the relationship among elements (instructions) within a module. If a module does more than one discrete task, the instructions in that module are said not to be bound together very closely. Modules that perform only one task are said to be more cohesive (and less error-prone) than modu1lols that perform multiple tasks. Compare it to the poorly cohesive modules in and you can see how important cohesion is.

No comments:

Post a Comment