- the best tool for designing a modular, top-down system.
- a hierarchical representation of the time-independent flow of control among the
functions of a system, a flow which is usually accomplished by calls to functions and
- consists of rectangular boxes, which represent modules, and connections.
- a collection of functions that act on the same object, i.e., a continuous set of
statements that performs a specific task.
- can be labeled in two ways:
- 1, 1.1, 1.2, etc., with the number to the right of the decimal point signifying that
those modules are subsets of module 1.
- 100, 110, and 120, which allows the insertion of subordinate modules using a number
between 110 and 120.
- a vector joining two modules, going from the calling module (supervisor)
to the called module (subordinate).
- each points downward since the structure chart is hierarchical, with the supervisor
higher than its subordinates.
- implies that there is an unconditional return to the supervisor when the subordinate
- with or without arrowhead.
- indicates iteration or looping when attached to a module.
- indicates that some of the subordinate modules will be repeated until they are
- Figure 20.11.
- indicates selection or conditional when attached to the bottom of a module.
- signifies that only some of the modules below the diamond will be performed.
- The diamond does not indicate which modules will be selected, and the loop does not
indicate which modules will be repeated. They are meant to be general, not specific. Both
can be made more specific by restricting the drawing.
Types of Modules
Control modules, or dispatchers
- usually found near the top of the structure chart and contain the logic for performing
the lower-level modules.
- includes statements such as IF, PERFORM, and DO.
- includes few detailed statements such as ADD and MOVE.
- should not be very large in size since control logic is usually the most difficult to
- limited to seven to nine subordinate modules; if more are needed then additional control
modules should be introduced that are subordinate to the original control module.
- logic may require a decision tree or decision table.
- are those derived from the DFD.
- usually perform only one task, although several secondary tasks may be associated with
the primary task.
- Example: PRINT TOTAL LINE.
- usually have mixed statements, a few IF and PERFORM or DO statements, and many detailed
statements such as MOVE, ADD, etc.
- are lower in the structure than control modules.
- are the lowest in the structure, with a rare subordinate module below them.
- perform only one task, such as formatting, reading, etc.
- some of these modules can be found on the DFD, but in many cases they have to be
Types of Connections
- represented by an arrow with an empty circle.
- represents a data item that moves from one module to another.
- all shared or passed data must appear as a couple; one connection may have several
couples; and each couple must be entered in the data dictionary.
- A module should receive only the data necessary to complete its task.
Switch (or flag)
- represented by an arrow with a filled-in circle.
- represents a specific type of couple that is set and tested in order to communicate
information about some condition or other data item.
- Couples and flags should be kept to a minimum in order to enhance modifiability.
- While control is intended to return from lower-level modules to those higher in the
structure, it may sometimes be necessary to pass control downward in the structure.
- If a flag is used for this purpose it indicates that a lower-level module is making a
decision, resulting in a module that is performing two separate tasks, which is a
violation of the ideal functional module -- one that performs a single task only.
- Figure 20.7 and 20.9 demonstrate this situation and its solution.