Quelpr

CAPE Computer Science Unit 1 · 2016 · Paper 2 · Question 3(a)

A library processes customer records containing customer ID, number of overdue books, and fine rate category (P at 4.50/book, N at 6.50/book), terminated by ID 9999.

Write an algorithm to read the customer data and determine the total outstanding fines for each customer, the total fines paid under category N and under category P, the overall total fines paid, the total number of customers, and the customer ID with the highest fine paid (ignoring ties).

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 3(b)Distinguish between 'bounded iteration' and 'unbounded iteration'.[4 marks]
  2. 3(c)Write an algorithm to calculate the sum of all multiples of 7 between 21 and 210 inclusive.[6 marks]

More practice: the rest of this paper · more Algorithm Verification and Development questions · all CAPE Computer Science Unit 1 past papers