AS · Practice questions · Structure charts

Boxes, lines and arrows.

Six original Cambridge-style questions on structure charts, with mark-scheme style solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Read the arrows.

01
Recall
[2 marks]

State the purpose of a structure chart.

  • To show how a problem is decomposed into modules / sub-tasks and the hierarchy of the modules (which module calls which). ✓
  • To show the parameters (data and flags) passed between the modules. ✓
02
Explain
[2 marks]

Explain the difference between the two kinds of parameter arrow on a structure chart.

  • An arrow with a hollow circle is a data couple: a data value passed between modules. ✓
  • An arrow with a filled circle is a flag: a Boolean value that tells the receiving module about a condition / controls what it does. ✓
03
Apply
[4 marks]

A program inputs a temperature in Celsius, converts it to Fahrenheit and outputs both. The main module is TempConvert. Describe a structure chart with modules InputTemp, Convert and OutputTemps, giving every parameter and its direction.

  • TempConvert at the top, calling InputTemp, Convert and OutputTemps (left to right) below it. ✓
  • Celsius passes up from InputTemp to TempConvert. ✓
  • Celsius passes down to Convert; Fahrenheit passes up from Convert. ✓
  • Celsius and Fahrenheit pass down to OutputTemps; all are data couples (hollow circles). ✓
04
Write
[4 marks]

On a structure chart, module ReadScores passes the array Scores up to the main module. Scores then passes down to module FindHighest, which passes Highest (an INTEGER) back up. Scores is ARRAY[1:50] OF INTEGER. Write pseudocode for FindHighest.

  • Header: FUNCTION FindHighest(Scores : ARRAY[1:50] OF INTEGER) RETURNS INTEGER (accept an equivalent array parameter). ✓
  • Initialise Highest ← Scores[1]. ✓
  • FOR Index ← 2 TO 50 with IF Scores[Index] > Highest THEN Highest ← Scores[Index] ENDIF, NEXT Index. ✓
  • RETURN Highest, ENDFUNCTION. ✓
05
Analysis
[2 marks]

In a structure chart, a curved arrow crosses the lines from module Main to modules GetItem and AddToBasket. Explain what this shows and how it appears in the pseudocode for Main.

  • It shows iteration: GetItem and AddToBasket are called repeatedly (in that order). ✓
  • In Main, the calls to GetItem and AddToBasket are inside a loop (e.g. WHILE / REPEAT / FOR). ✓
06
Explain
[2 marks]

Give two benefits of designing a program with a structure chart before coding it.

  • The problem is decomposed into modules that can be written and tested independently, possibly by different programmers. ✓
  • The interfaces (parameters) between modules are agreed in advance, so the modules fit together / modules can be reused. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.