Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2023 · Paper 42 · Question 3

9618

As printed in the paper

The question as text

A company needs a computer program to store data about its employees. Part of the program is being written using object‑oriented programming. The class Employee stores data about the employees. Each employee has an employee number, a job title and hourly pay rate. The class will also store the amount they are paid each week over a 52‑week year in a 1D array. Employee HourlyPay : REAL EmployeeNumber : STRING JobTitle : STRING PayYear2022 : ARRAY[0:51] OF REAL stores the amount each employee gets paid each hour stores the employee’s unique number stores the employee’s job title stores the amount the employee has been paid each week Constructor() GetEmployeeNumber() SetPay() GetTotalPay() initialises HourlyPay, EmployeeNumber and JobTitle from the values passed as parameters initialises all 52 elements in PayYear2022 to 0.0 returns the employee number takes the week number and number of hours worked that week as parameters calculates and stores the pay for that week in PayYear2022 returns the total of all the values in PayYear2022

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 3(a)(i)[5]

  • 3(a)(ii)[2]

  • 3(a)(iii)[3]

  • 3(a)(iv)[2]

  • 3(b)(i)[4]

  • 3(b)(ii)[3]

  • 3(c)[7]

  • 3(d)[4]

  • 3(e)(i)[2]

  • 3(e)(ii)[1]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.