Question 7

Edexcel Computer Science June 2019 Paper 2GCSE8 marks

On the specification

(a)
6.3 Data types and structures
(b)
6.2 Program constructs
(c)
6.2 Program constructs
Question text

7 Margaret has introduced a loyalty scheme for the ice cream kiosk customers. (a) Each month, Margaret emails a statement to the loyalty scheme members. An example statement is shown. Member Number: 987654 Dear Tom, You have made 123 visits to the ice cream kiosk. You have spent £246.31. You have collected 210 points in total and have redeemed 75 points. Your current balance is 135 points. Thank you for visiting Margaret’s Ice Cream Kiosk. Draw a diagram of a data structure suitable for storing this data. Include data for at least two members of the loyalty scheme. (3) (b) Margaret wants to send out vouchers to every member of the loyalty scheme. A logical looping construct is needed in the programming code to make this happen. State the most appropriate type of loop and justify your choice. (2) Type of loop Justification (c) An algorithm that displays information about the number of members in the loyalty scheme is shown. The use of multiple selection statements in this algorithm is inefficient. Explain how the algorithm should be amended to address this inefficiency. (3) (Total for Question 7 = 8 marks)