Question 6(c) 2017 · October-November · Paper 42 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (c)
Question 1
mark per bullet to max 5
Question 5
- Class declaration and end
- Declaration of inheritance
- Amount and PaymentInterval as Private/protected with appropriate data types
- Override / Overriding in constructor
- Constructor heading and end
- «taking values as parameters
- Constructor setting all values using base class
- Initialisations of new attributes in the constructor
- « all set to the parameters
Show text version of question
Question 6
Part (c)
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).
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 (c)
Write program code to declare the SavingsAccount class. Do not write any get or set
methods.
Programming language ............................................................................................................
Program code ...........................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[5]
Question 15
Question 16
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
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
