Seven program modules form part of a program. A description of the relationship between the modules is summarised below. Any return values are stated in the description. Module name | Description ---|--- Mod-A | calls Mod-B followed by Mod-C Mod-B | • called with parameters Par1 and Par2 • calls either Mod-D or Mod-E, determined when the program runs • returns a Boolean value Mod-C | • called with parameters Par1 and Par3 • Par3 is passed by reference • repeatedly calls Mod-F followed by Mod-G Mod-D | called with parameter Par2 Mod-E | • called with parameter Par3 • returns an integer value Mod-F | called with parameter Par3 Mod-G | • called with parameter Par3 • Par3 is passed by reference Parameters in the table are as follows: : Par1 and Par3 are of type string. Par2 is of type integer.
- (a)(i)Identify the modules that would be implemented as functions.[1]
- (a)(ii)Modules Mod-F and Mod-G are both called with Par3 as a parameter. In the case of Mod-F, the parameter is passed by value. In the case of Mod-G, the parameter is passed by reference. Explain the effect of the two different ways of passing the parameter Par3.[2]
- (b)Draw a structure chart to show the relationship between the seven modules and the parameters passed between them. [Figure 7.1][6]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (May/June 2024). The mark or mark type is shown in brackets.
- [1] (a)(i) Mod-B() and Mod-E()
- [1] (a)(ii) any change made to the parameter value / Par3 within Mod-G() is reflected in the (subsequent) value in the calling module / Mod-C () (after Mod-G() terminates)
- [1] (a)(ii) any change made to the parameter value / Par3 within Mod-F() is NOT reflected in the (subsequent) value in the calling module / Mod-C () (after Mod-F() terminates)
- [1] (b) All modules correctly labelled and interconnected
- [1] (b) Parameters between Mod-A and Mod-B and return value from Mod-B
- [1] (b) Parameters between Mod-A and Mod-C
- [1] (b) Diamond applied to Mod-B only
- [1] (b) Iteration arrow applied to Mod-C only
- [1] (b) All parameters at lower level and return value
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →