Cambridge AS Level Computer Science 9618 · 12.1 Program Development Life cycle

Q8 · 9618/23/O/N/24 Q7

Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 1 of 3.

Q89618/23/O/N/24original Q7Structured · 6 marks
Question 7 from 9618/23/O/N/24

Worked solution

(a)

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]

(b)

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).

KEY IDEADecomposition breaks a big problem into small named modules that each do one job.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/23/O/N/24 question 7
VIDEO
▶ 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.