Question 1(e)(ii) 2019 · October-November · Paper 43 · 2 marks
Question 1
Part (e)
(ii)
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
(ii)
Write program code for the SetFirstName()method.
Programming language .....................................................................................................
Program code
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.....................................................................................................................................
Reveal official mark-scheme answer
Official answer for Question 1
Part (e)
(ii)
Question 1
mark per bullet point
Question 2
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_43.pdf
