Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
Write: it makes the problem easier to design, solve or implement [1]
Pick three items the text module needs and say why. Any three of these:
Mobile phone number - to send the text message [1]
Name - to personalise the message [1]
Exercise interest - to decide whether this member would be interested in the class [1]
Any two operations when a reply comes in:
Add the member to the list for the new class [1]
Remove the member from future messages (when the reply is STOP), or read / process the message, or find out who sent it [1]
A diamond on a structure chart means selection.
It shows selection (a decision): Update calls only one of the modules [1]
Name all four modules: Update calls one of Sub-A, Sub-B or Sub-C [1]
Sub-A is a procedure with Name going in and P2 going both ways (BYREF). Sub-B is a function with P1 going in and T1 coming back, both real.
PROCEDURE Sub-A(Name : STRING, BYREF P2 : BOOLEAN) FUNCTION Sub-B(P1 : REAL) RETURNS REAL
Sub-A: PROCEDURE Sub-A [1]
Sub-A: the parameters (Name : STRING, BYREF P2 : BOOLEAN) [1]
Sub-B: FUNCTION Sub-B with the parameter (P1 : REAL) [1]
Sub-B: RETURNS REAL [1]
▶ Starts at Q7 (1:05:13)
Starts at Q7 (1:05:13) · 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.