DesignStructure diagram examples

Pseudocode, flow charts and structure diagram are techniques that are used to design software. These allow data flow, constructs and variables to be identified before coding begins.

Part ofComputing ScienceSoftware design and development

Structure diagram examples

At the top of each structure diagram, it is necessary to define the general problem that is to be solved. The programmer will consider the purpose and functional requirements that were established at the analysis phase.

In this example, the information from the analysis phase is shown below to provide a context for the structure diagrams that follow.

Analysis used to inform design

Purpose:

  • Software should be created to allow a user to enter ten numbers.
  • Each number must be validated to make sure that it is no less than 0 and no more than 100.
  • The program should keep a running total of the numbers entered and output the final total.

Functional requirements

InputsProcessesOutputs
Ten numbersValidate ten numbersTotal
Calculate total
InputsTen numbers
ProcessesValidate ten numbers
OutputsTotal
Inputs
ProcessesCalculate total
Outputs

Design using structure diagram

This structure diagram shows one approach to creating a design that is based upon the purpose and functional requirements shown above.

Structure diagran

The structure diagram shown below is an alternative design for the same problem. This time a selection statement is used as part of the solution.

N5 Computing Science structure diagram 2