Past-paper question · 2017 October-November · Paper 42 · Q6(b)

Question 6(b) 2017 · October-November · Paper 42 · 5 marks

Original past-paper question for 6(B)
Original past-paper question for 6(B)
Reveal official mark-scheme answer Official mark-scheme answer for 6(B)Official mark-scheme answer for 6(B)Official mark-scheme answer for 6(B)Official mark-scheme answer for 6(B)

Official answer for Question 6

Part (b)

Question 1

mark per bullet to max 5

Question 5

  • Class heading and ending
  • Identifying inheritance
  • Declaring AccountNumber, Balance
  • Use of private/protected for AccountNumber and Balance
  • One Correct Get Method
  • One Correct Set Method
  • Second correct Get and Set Methods
✓
Example VB
✓
MustInherit Class Account
✓
Private AccountNumber As String
✓
Private Balance As Decimal
✓
Sub SetAccountNumber(AccNumP As String)
✓
AccountNumber = AccNumP
✓
End Sub
✓
Function GetAccountNumber() As String
✓
return AccountNumber
✓
End Function
✓
Sub SetBalance (BalanceP As Decimal)
✓
Balance = BalanceP
✓
End Sub
✓
Function GetBalance() As Decimal
✓
return Balance
✓
End Function
✓
End Class
✓
or
✓
MustInherit Class Account
✓
Private AccountNumber As String
✓
9608/42
✓
Cambridge International AS/A Level – Mark Scheme
✓
October/November
✓
PUBLISHED
✓
2017
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w17_ms_42.pdf →

Show text version of question

Question 6

Part (b)

Question 6

A bank has a range of customer accounts, which includes current accounts and savings accounts.

All accounts have:

  • an account number
  • a balance (amount of money in an account).
A
current account has a level (bronze, silver or gold). A monthly fee ($) is taken from each account.

Savings account customers pay a regular amount ($) into their account. The payment interval is a number of weeks (for example, 4).

An object-oriented program will be written to process data about the accounts.

Part (b)

Write program code to declare the Account class.

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

Program code ...........................................................................................................................

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...............................................................................................................................................[5]

Question 14

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_w17_qp_42.pdf

Keep practising this topic