Structure diagrams and pseudocode

From Higher Computing Science
Jump to: navigation, search

This article is unfinished. Please consider joining and adding to this article. Read about Page layout beforehand.

Key points

  • To create a design for the program structure, the program first must be broken down into modules. These are sub-steps of the main problem - for example a program that calculates an average will have several sub-steps, such as asking for numbers, adding them together, finding a total and calculating an average.
  • Sub-steps may be broken down into smaller steps, until simple instructions describe in detail what the program will do. When the sub-steps are at the same level of detail as the code, this is called an algorithm.
  • In pseudocode, main steps are written in a numbered list, as instruction in English. Sub-steps are added to the list for each main step. An example of this would be sub-steps 1.1 and 1.2 for main step 1.
  • Pseudocode language should be clear, but does not have to be written as a program.
  • In a structure diagram, the same steps and sub-steps that are used in the pseudocode are represented in boxes. Each row represents a level of detail, and main steps are connected to sub-steps with a downwards arrow. Steps are written left to right.

Information

Videos

Further information

Test yourself

Teaching resources

File:Module in Pseudocode.png
Example of pseudocode