Lompat ke konten

Labs · 9618 AS 12.2

Structure Charts

Build structure charts from module headers: who calls whom, loops and choices, and which way every parameter goes. The chart is drawn as you choose.

5 levelsFree bench

In the exam

9618/22 May/June 2022 · Question 3 · 9 marks

Five module headers are given (Mod_V to Mod_Z); Head() repeatedly calls three of the modules in sequence. (a)(i) Complete the structure chart (no parameter labels, no module names). (ii) Write each module name in place of the labels A to F. (b) Describe three benefits of decomposition.

Points that gain marks

  • (a)(i) The iteration arrow under A; the parameter arrows (data couples) for each module, including the flag returned to A by D and the return value from E.
  • (ii) A Head, B Mod_W, C Mod_X, D Mod_V, E Mod_Z, F Mod_Y.
  • (b) Smaller problems are easier to understand and solve; easier to program, test and maintain; sub-problems can be given to different programmers or teams.

In this lab: Level 4 is part (a)(ii); level 5 covers part (b)'s idea.

9618/23 May/June 2022 · Question 3 · 7 marks

(a) Describe the purpose of a structure chart. (b) Module Section_1() calls one of the other three modules, chosen when the program runs. Draw the structure chart.

Points that gain marks

  • (a) It shows the module relationships / hierarchy / selection / repetition, or how a problem is broken down.
  • It shows the parameters passed between modules, or whether a module is a function or a procedure.
  • (b) Four boxes linked correctly; parameters to Sub1_A; parameter to Sub1_B and its return value; parameters to Sub1_C; the selection diamond.

In this lab: Level 1 is part (b); level 5 has part (a).

9618/22 October/November 2023 · Question 7 · 6 marks

(a) Complete the structure chart for six modules (Module-A, Module-X, Reset, Restore, Module-Y, Module-Z). (b) Explain the meaning of the diamond symbol.

Points that gain marks

  • (a) Module names; parameters with labels to Module-X and between Module-X and Reset; the parameter to Module-Z and its return value; parameters to Module-Y and Restore and their return values.
  • (b) Module-A calls either one of Module-X, Module-Y or Module-Z; which one is decided at runtime (selection).

In this lab: Level 2.

9618/23 May/June 2024 · Question 7(b) · 6 marks

Draw a structure chart to show the relationship between the seven modules and the parameters passed between them.

Points that gain marks

  • All modules correctly labelled and connected.
  • Parameters between Mod-A and Mod-B and the return value from Mod-B; parameters between Mod-A and Mod-C.
  • The diamond on Mod-B only; the iteration arrow on Mod-C only.
  • All parameters at the lower level, and the return value.

In this lab: Level 3.

More real experiments

Masuk atau buat akun

IGCSE, A-Level & AP