Question 9(a) 2022 · May-June · Paper 12 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 9
Part (a)
Question 6
Show text version of question
Question 9
Part (a)
Question 9
Many companies use computers to process their payroll.
The master file contains the WorkerID, RateOfPay and WagesSoFar fields as well as other details. The WagesSoFar field represents how much each worker has earned so far this year.
Each worker’s wage is calculated by multiplying the HoursWorked by the RateOfPay. When the wage for that week is calculated, it is added on to the WagesSoFar field.
Every week the master file has to be updated to include the new wage earned so far this year.
Part (a)
Complete the following pseudocode algorithm which shows the process of updating the
master file. You can assume no other transactions are being carried out.
READ first record in transaction file READ first record in old master file WHILE not end of transaction file IF transaction file WorkerID = master file WorkerID THEN
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
Question 11
Why this question appears here
80% assigned-topic match · Algorithms and flowcharts › Algorithms and flowcharts
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9626_s22_qp_12.pdf
