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

Question 1(c)(v) 2019 · October-November · Paper 42 · 4 marks

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

Official answer for Question 1

Part (c)

(v)

Question 1

mark per bullet point

Question 4

✓
•
✓
Set method/function header and close (where needed) with parameter
✓
•
✓
Checking value of parameter for both true and false «
✓
•
✓
« If valid – setting Pension to parameter and returning True
✓
•
✓
« If not valid – not setting Pension and returning False
✓
Example code:
✓
Pascal
✓
Function salaryEmployee.SetPension(NewPension) : boolean;
✓
IF NewPension = true or NewPension = false THEN
✓
Pension := NewPension;
✓
Result := true;
✓
ELSE
✓
Result := false;
✓
end;
✓
Python
✓
def SetPension(self, NewPension):
✓
if NewPension == True Or NewPension == False:
✓
self.__Pension = NewPension
✓
return True
✓
else:
✓
return False
✓
VB.NET
✓
Public Function SetPension(NewPension) AS Boolean
✓
If NewPension = True Or NewPension = False Then
✓
Pension = NewPension
✓
Return True
✓
Else
✓
Return False
✓
End If
✓
End Function
✓
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)

(v)

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.

(v)

Write program code for the SetPension()method in the SalaryEmployee()class.

  • The method takes a new value for Pension as a parameter.
  • If the parameter’s value is valid (it is TRUE or FALSE), the method returns TRUE and
  • sets the parameter’s value.

  • Otherwise the method returns FALSE and does not set Pension.

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

Program code

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

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

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

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

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

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

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

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

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

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

[4]

Question 7

Question 1 continues on the next page.

Question 8

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