Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 1 of 3.
Talking to the owner about what is needed is the first stage.
Stage: analysis [1]
Document: a requirements specification (or interview notes, feasibility study, list of problems with the old system) [1]
Write four sub-modules with a use (any four):
ScanCard() – reads the bar code and gets the customer ID [1]
GetPoints() – gets the number of points the customer has [1]
CalculatePoints() – works out the points earned from a purchase [1]
CalculateDiscount() – works out the discount when points are exchanged [1]
Other correct sub-modules also score, for example UpdatePoints() (updates the total points), ExchangePoints() or UpdateCard() (takes off the points used) and ShowDiscount() (displays the discount).
▶ Whole paper
Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.