9618/22/M/J/23 question 7: worked solution (May/June 2023, paper 22)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 12.2 Program Design Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3. Q18 9618/22/M/J/23 original Q7 Structured · 9 marks Worked solution (a)(i) Pick three items the email module really uses and say why. Any three of these pairs: Customer name - to personalise or address the email [1] Email address - so the email is delivered to the right place [1] Product category preference - to check the customer would be interested in the new product [1] Other accepted pairs: contact preference (checks the customer accepts email), order history (find similar products or frequent shoppers), new product information (goes in the email). (a)(ii) Pick two items the module does not use and give a reason for each. Any two of these pairs: Postal address - the module sends an email, not a letter [1] Payment details - nothing is being bought or sold at this stage [1] Another accepted pair: order history, because the stated interests decide whether the product is relevant. (b) Draw the arrows from the table. Each arrow is labelled Input | Output. S1 to S2: draw an arrow from S1 to S2 and label it Input PIN [1] S2 loop: label the loop on S2 Re-input PIN | Display error [1] S3: draw a new circle S3 with an arrow coming from S2 labelled Too many tries | Block Account [1] S4: draw a new circle S4 with an arrow coming from S2 labelled Valid PIN | Enable payment [1] The Cancel | Re-prompt arrow from S2 back to S1 is already drawn. KEY IDEA In a state-transition diagram every row of the table becomes one labelled arrow from the current state to the next state. TOTAL 9 marks Official mark scheme VIDEO ▶ Starts at Q7 (48:58) Starts at Q7 (48:58) · by Pseudocode Pro. Tap the picture to open it on YouTube.