Past-paper question · 2019 October-November · Paper 42 · Q1(c)(vi)

Question 1(c)(vi) 2019 · October-November · Paper 42 · 8 marks

Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Original past-paper question for 1(C)(VI)
Reveal official mark-scheme answer Official mark-scheme answer for 1(C)(VI)Official mark-scheme answer for 1(C)(VI)Official mark-scheme answer for 1(C)(VI)Official mark-scheme answer for 1(C)(VI)

Official answer for Question 1

Part (c)

(vi)

Question 1

mark per bullet point to max 8

Question 8

✓
•
✓
Function header and close (where needed) with at least one parameter
✓
•
✓
Constants used for hours bonus, month bonus, holiday bonus, pension cost(at least 3)
✓
•
✓
Checking if Hours is > = 160, calculating bonus payment (monthlypay * 0.05)
✓
•
✓
Checking if pension is true, calculation pension to pay (monthlypay * 0.04)
✓
•
✓
Checking if public holiday is true, calculation of bonus payment (monthlypay * 0.03)
✓
•
✓
« all 3 Hours, Pension and PublicHoliday accessed from the parameter using Get methods
✓
•
✓
Adding both bonus payments to basic salary and deducting pension from salary
✓
•
✓
« basic salary accessed by using GetMonthlyPayment with the parameter
✓
•
✓
Outputting the total final bonus and pension with appropriate message
✓
•
✓
Returning the new salary
✓
Example code:
✓
Pascal
✓
Function CalculateMonthlySalary(TheEmployee : SalaryEmployee) : real;
✓
var
✓
BonusPayment : real;
✓
PensionPayment : real;
✓
BasicSalary : real;
✓
const
✓
HoursBonus : real = 0.05;
✓
HoursMonthBonus : integer = 160;
✓
PensionCost : real = 0.04;
✓
PublicHolidayBonus : real = 0.03;
✓
begin
✓
BonusPayment :=0;
✓
PensionPayment :=0;
✓
BasicSalary :=0;
✓
9608/42
✓
Cambridge International AS/A Level – Mark Scheme
✓
October/November 2019
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w19_ms_42.pdf →

Show text version of question

Question 1

Part (c)

(vi)

Question 1

A technology company needs software to calculate how much each employee should be paid.

The company decides to implement a program for the software using object-oriented programming (OOP).

Each employee has a unique employee ID, name, address and date of birth. There are two types of employee: salary and apprenticeship.

Salaried employees are paid a fixed monthly payment. The hours a salary employee works in a month are recorded to calculate bonus payments. They may receive bonus payments and make pension payments (given in part(b)).

Apprenticeship employees are paid weekly. They receive an hourly rate of pay. Apprenticeship employees do not receive bonus payments or make pension payments.

(vi)

A SalaryEmployee is paid a fixed monthly payment.

  • If the employee has worked a public holiday, they receive a 3% bonus payment.
  • This is calculated from their MonthlyPayment.

  • If the employee has worked 160 or more hours in a month, they receive an additional
  • 5% bonus payment, calculated from their MonthlyPayment.

  • If the employee pays into a pension, 4% will be subtracted from their

MonthlyPayment.

Monthly salary is the final payment the employee receives.

For example, Chris is a SalaryEmployee. His fixed MonthlyPayment is $1000. He has worked a public holiday. He has worked 165 hours this month. He pays into a pension.

  • The public holiday bonus is $30 (3% of $1000)
  • The hours worked bonus payment is $50 (5% of $1000)
  • The pension payment is $40 (4% of $1000)

Chris’s monthly salary is calculated as ($1000 + $30 + $50) − $40 = $1040

The function CalculateMonthlySalary()is used to calculate the monthly salary. It:

  • takes a SalaryEmployee as a parameter
  • calculates the bonus payments and pension payment
  • outputs the pension payment and total bonus payment
  • calculates and returns the monthly salary.

Write program code for the function CalculateMonthlySalary().

Programming language .....................................................................................................

Program code

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Question 9

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.....................................................................................................................................

[8]

Question 10

Topic relevance

Why this question appears here

98% assigned-topic match · Further programming › Programming paradigms

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 9608_w19_qp_42.pdf

Keep practising this topic