9618/23/O/N/24 question 7: worked solution (October/November 2024, paper 23)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 12.1 Program Development Life cycle Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 1 of 3. Q8 9618/23/O/N/24 original Q7 Structured · 6 marks 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 IDEA Decomposition breaks a big problem into small named modules that each do one job. TOTAL 6 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.