Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 3 of 3.
Fixing an error in a released program is maintenance.
Write: corrective maintenance [1]
Say what each feature does and in what order they are used:
First set a breakpoint at the start of (or inside) Lookup(). This stops the program at that line [1]
Then use single stepping to run one statement at a time [1]
Use the watch window to show the values of variables as each line runs, to spot where the value goes wrong [1]
Write any two features that help while coding:
Auto-complete / auto-correction of keywords and names [1]
Pretty print / auto-indentation, or dynamic syntax checking, or context-sensitive prompts, or collapsing code blocks [1]
Choose the type that suits the data:
| Variable name | Used to store | Data type |
|---|---|---|
| Name | A customer name | STRING |
| Index | An array index | INTEGER |
| Result | The result of the division of any two non-zero numbers | REAL |
Name: STRING [1]
Index: INTEGER [1]
Result: REAL [1]
▶ Whole paper
Video solution of the whole paper · by Papersdock. 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.