Past-paper question · 2019 October-November · Paper 41 · Q1(e)(v)

Question 1(e)(v) 2019 · October-November · Paper 41 · 2 marks

Question 1

Part (e)

(v)

Question 1

Each student at CIE University needs a printing account to print documents from university

computers.

The university is developing software to manage each student’s printing account and the printing process. There are 1000 students at the university. They will each require a printing account.

Students need to buy printing credits that will be added to their account. Each page printed uses one printing credit.

The university needs software to keep track of the number of printing credits each student has in their account. The university has decided to implement the software using object-oriented programming (OOP).

The following diagram shows the design for the class PrintAccount. This includes the attributes and methods.

PrintAccount FirstName : STRING // parameter sent to Constructor() LastName : STRING // parameter sent to Constructor() PrintID : STRING // parameter sent to Constructor() Credits : INTEGER // initialised to 50 Constructor() // instantiates an object of the PrintAccount class, // and assigns initial values to the attributes GetName() // returns FirstName and LastName concatenated // with a space between them GetPrintID() // returns PrintID SetFirstName() // sets the FirstName for a student SetLastName() // sets the LastName for a student SetPrintID() // sets the PrintID for a student AddCredits() // increases the number of credits for a student RemoveCredits() // removes credits from a student account

Question 9

(v)

A global array, StudentAccounts, stores 1000 instances of PrintAccount.

Write pseudocode to declare the array StudentAccounts.

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

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

[2]

Question 12

Reveal official mark-scheme answer Official mark-scheme answer for 1(E)(V)

Official answer for Question 1

Part (e)

(v)

Question 1

mark per bullet

Question 2

  • Declaring StudentAccounts as array of 1000 elements«
  • «of type PrintAccount
✓
DECLARE StudentAccounts ARRAY[0:999] OF PrintAccount
✓
9608/41
✓
Cambridge International AS/A Level – Mark Scheme
✓
October/November 2019
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w19_ms_41.pdf →

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

Keep practising this topic