ข้ามไปยังเนื้อหา

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

Exam questions on what this lab teaches, with the points that gain marks.

9618/22 May/June 2022 · Question 39 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

  1. (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.
  2. (ii) A Head, B Mod_W, C Mod_X, D Mod_V, E Mod_Z, F Mod_Y.
  3. (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 37 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

  1. (a) It shows the module relationships / hierarchy / selection / repetition, or how a problem is broken down.
  2. It shows the parameters passed between modules, or whether a module is a function or a procedure.
  3. (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 76 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

  1. (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.
  2. (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

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

In this lab: Level 3.

The question as printed in the exam paper

More real experiments

All labs →

เข้าสู่ระบบหรือสร้างบัญชี

IGCSE, A-Level & AP