Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
Use the module headers to place each module and its parameters. Connect is at the top. The left box is Sync (its curved arrow means it repeats calls) and the right box is Activate:
Hierarchy: Connect calls Sync and Activate. Sync calls Reset and Enable (bottom left boxes). Activate calls Initialise (bottom right box). [1]
Connect to Sync: T1 and S2 going down, and an integer return value going up. Connect to Activate: H1 and Code going down, and a Boolean return value going up. [1]
Sync to Reset: RA going down and an integer return value going up. Sync to Enable: SA going down and a Boolean return value going up. [1]
Activate to Initialise: CC going down (BYVAL). ID going down and up, because it is BYREF. [1]
Draw a decision diamond at the bottom of Connect, because it calls either Sync or Activate [1]
Say what the curved arrow means:
It means iteration (repetition) [1]
Sync repeatedly calls Reset and then Enable, in that order [1]
▶ Whole paper
Video solution of the whole paper · by Pseudocode Pro. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.