Cambridge A Level Computer Science 9608 — 2019 Oct/Nov Paper 4 · Variant 1

9608/41/O/N/19 · 75 marks · ≈84 min

The question paper and its mark scheme, free to read here and free to download. This is Cambridge’s own paper, exactly as it was sat.

← All Computer Science papersWhat was in this paper?

Question paper16 pages

Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 1 of 16
Page 1 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 2 of 16
Page 2 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 3 of 16
Page 3 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 4 of 16
Page 4 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 5 of 16
Page 5 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 6 of 16
Page 6 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 7 of 16
Page 7 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 8 of 16
Page 8 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 9 of 16
Page 9 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 10 of 16
Page 10 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 11 of 16
Page 11 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 12 of 16
Page 12 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 13 of 16
Page 13 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 14 of 16
Page 14 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 15 of 16
Page 15 of 16
Cambridge A Level Computer Science 9608 2019 Oct/Nov Paper 4 · Variant 1 question paper, page 16 of 16
Page 16 of 16

Mark scheme19 pages

Answers below. Sit the paper first if you are practising.

Mark scheme, page 1 of 19
Page 1 of 19
Mark scheme, page 2 of 19
Page 2 of 19
Mark scheme, page 3 of 19
Page 3 of 19
Mark scheme, page 4 of 19
Page 4 of 19
Mark scheme, page 5 of 19
Page 5 of 19
Mark scheme, page 6 of 19
Page 6 of 19
Mark scheme, page 7 of 19
Page 7 of 19
Mark scheme, page 8 of 19
Page 8 of 19
Mark scheme, page 9 of 19
Page 9 of 19
Mark scheme, page 10 of 19
Page 10 of 19
Mark scheme, page 11 of 19
Page 11 of 19
Mark scheme, page 12 of 19
Page 12 of 19
Mark scheme, page 13 of 19
Page 13 of 19
Mark scheme, page 14 of 19
Page 14 of 19
Mark scheme, page 15 of 19
Page 15 of 19
Mark scheme, page 16 of 19
Page 16 of 19
Mark scheme, page 17 of 19
Page 17 of 19
Mark scheme, page 18 of 19
Page 18 of 19
Mark scheme, page 19 of 19
Page 19 of 19

Paper as text

Question paper, page 1

This document consists of 16 printed pages. DC (SC/CB) 168338/4 © UCLES 2019 [Turn over * 4 6 5 7 4 7 4 3 8 1 * COMPUTER SCIENCE 9608/41 Paper 4 Further Problem-solving and Programming Skills October/November 2019 2 hours Candidates answer on the Question Paper. No Additional Materials are required. No calculators allowed. READ THESE INSTRUCTIONS FIRST Write your centre number, candidate number and name in the spaces at the top of this page. Write in dark blue or black pen. You may use an HB pencil for any diagrams, graphs or rough working. Do not use staples, paper clips, glue or correction fluid. DO NOT WRITE IN ANY BARCODES. Answer all questions. No marks will be awarded for using brand names of software packages or hardware. At the end of the examination, fasten all your work securely together. The number of marks is given in brackets [ ] at the end of each question or part question. The maximum number of marks is 75. Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level

Question paper, page 2

2 9608/41/O/N/19 © UCLES 2019 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. (a) Developing the software will include the following activities. Activity Description Time in weeks Predecessor A Identify requirements 1 - B Produce design 3 A C Write code 10 B D Test modules 7 B E Final system black-box testing 3 C, D F Install software 1 E G Acceptance testing 2 F H Create user documentation 2 F (i) Add the correct activities and times to the following Program Evaluation Review Technique (PERT) chart for the software development. Two activities and times have been done for you. 1 2 3 1 F 6 5 7 8 9 4 1 A [6]

Question paper, page 3

3 9608/41/O/N/19 © UCLES 2019 [Turn over (ii) State what is meant by the critical path in a PERT chart. … … [1] (iii) Identify and describe a project planning technique, other than a PERT chart. … … … … [2] (b) When a student prints a document, a print job is created. The print job is sent to a print server. The print server uses a queue to hold each print job waiting to be printed. (i) The queue is circular and has six spaces to hold jobs. The queue currently holds four jobs waiting to be printed. The jobs have arrived in the order A, B, D, C. Complete the diagram to show the current contents of the queue. Start Pointer End Pointer [1] (ii) Print jobs A and B are now complete. Four more print jobs have arrived in the order E, F, G, H. Complete the diagram to show the current contents and pointers for the queue. [3] (iii) State what would happen if another print job is added to the queue in the status in part (b)(ii). … … [1]

Question paper, page 4

4 9608/41/O/N/19 © UCLES 2019 (iv) The queue is stored as an array, Queue, with six elements. The following algorithm removes a print job from the queue and returns it. Complete the following pseudocode for the function Remove. FUNCTION Remove RETURNS STRING DECLARE PrintJob : STRING IF … = EndPointer THEN RETURN "Empty" ELSE PrintJob Queue[…] IF StartPointer = … THEN StartPointer … ELSE StartPointer StartPointer + 1 ENDIF RETURN PrintJob ENDIF ENDFUNCTION [4] (v) Explain why the circular queue could not be implemented as a stack. … … … … [2]

Question paper, page 5

5 9608/41/O/N/19 © UCLES 2019 [Turn over (c) The university wants to analyse how a printer and a print server deal with the print jobs. The following table shows the transitions from one state to another for the process. Current state Event Next state Printer idle Print job sent Printer active Printer active Print job added to queue Print job received Print job received Print job in progress Print job successful Print job received Print job in progress Print job unsuccessful Print job successful Check print queue Printer active Print job unsuccessful Error message displayed Printer active Printer active Timeout Printer idle Complete the state-transition diagram for the table. Printer idle Printer active Print job unsuccessful Print job successful Print job received Print job sent Print job in progress Start [5]

Question paper, page 6

6 9608/41/O/N/19 © UCLES 2019 (d) The university wants to assess troubleshooting issues with a printer. It wants to use a decision table to do this. The troubleshooting actions are: • check the connection from computer to printer, if the error light is flashing and the document has not been printed • check the ink status, if the quality is poor • check whether there is a paper jam, if the error light is flashing and the document has not been printed • check the paper size selected, if the paper size is incorrect. (i) Describe the purpose of a decision table. … … … … [2] (ii) Complete the rules for the actions in the following decision table. Rules Conditions Document printed but the quality is poor Y Y Y Y N N N N Error light is flashing on printer Y Y N N Y Y N N Document printed but paper size is incorrect Y N Y N Y N Y N Actions Check connection from computer to printer Check ink status Check if there is a paper jam Check the paper size selected [4]

Question paper, page 7

7 9608/41/O/N/19 © UCLES 2019 [Turn over (iii) Simplify your solution by removing redundancies. Rules Conditions Document printed but the quality is poor Error light is flashing on printer Document printed but paper size is incorrect Actions Check connection from computer to printer Check ink status Check if there is a paper jam Check the paper size selected [5]

Question paper, page 8

8 9608/41/O/N/19 © UCLES 2019 (e) 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 paper, page 9

9 9608/41/O/N/19 © UCLES 2019 [Turn over (i) Write program code for the Constructor() method. Programming language … Program code … … … … … … … … … [4] (ii) Write program code for the SetFirstName()method. Programming language … Program code … … … … … [2] (iii) Write program code for the GetName()method. Programming language … Program code … … … … … … [2]

Question paper, page 10

10 9608/41/O/N/19 © UCLES 2019 (iv) The method AddCredits()calculates the number of printing credits a student buys and adds the printing credits to the student’s account. • Credits cost $1 for 25 credits. • If a student buys $20 or more of credits in a single payment, they receive an extra 50 credits. • If a student buys between $10 and $19 (inclusive) of credits in a single payment, they receive an extra 25 credits. Payment from a student is stored in the variable MoneyInput. This is passed as a parameter. Write program code for AddCredits(). Use constants for the values that do not change. Programming language … Program code … … … … … … … … … … … … … … … … … … … [6]

Question paper, page 11

11 9608/41/O/N/19 © UCLES 2019 [Turn over (v) A global array, StudentAccounts, stores 1000 instances of PrintAccount. Write pseudocode to declare the array StudentAccounts. … … [2]

Question paper, page 12

12 9608/41/O/N/19 © UCLES 2019 (vi) The main program has a procedure, CreateID(), that: • takes the first name and last name as parameters • creates PrintID that is a concatenation of: ◦ the first three letters of the first name in lower case ◦ the first three letters of the last name in lower case ◦ the character ‘1’ for example, the name Bill Smith would produce "bilsmi1" • checks if the PrintID created already exists in the global array StudentAccounts: ◦ If PrintID does not exist, it creates an instance of PrintAccount in the next free index in StudentAccounts. ◦ If PrintID does exist, the number is incremented until a unique ID is created, for example, "bilsmi2". It then creates an instance of PrintAccount in the next free index in StudentAccounts. The global variable NumberStudents stores the number of print accounts that have currently been created. Write program code for the procedure CreateID(). Do not write the procedure header. Programming language … Program code … … … … … … … … … … … … … … …

Question paper, page 13

13 9608/41/O/N/19 © UCLES 2019 [Turn over … … … … … … … … … … [8]

Question paper, page 14

14 9608/41/O/N/19 © UCLES 2019 2 The following table shows part of the instruction set for a processor, which has one general purpose register, the Accumulator (ACC), and an Index Register (IX). Instruction Explanation Op code Operand LDM #n Immediate addressing. Load the number n to ACC. LDD <address> Direct addressing. Load the contents of the location at the given address to ACC. LDI <address> Indirect addressing. The address to be used is at the given address. Load the contents of this second address to ACC. LDX <address> Indexed addressing. Form the address from <address> + the contents of the Index Register. Copy the contents of this calculated address to ACC. LDR #n Immediate addressing. Load the number n to IX. STO <address> Store the contents of ACC at the given address. STX <address> Indexed addressing. Form the address from <address> + the contents of the Index Register. Copy the contents from ACC to this calculated address. ADD <address> Add the contents of the given address to the ACC. INC <register> Add 1 to the contents of the register (ACC or IX). DEC <register> Subtract 1 from the contents of the register (ACC or IX). JMP <address> Jump to the given address. CMP <address> Compare the contents of ACC with the contents of <address>. CMP #n Compare the contents of ACC with number n. JPE <address> Following a compare instruction, jump to <address> if the compare was True. JPN <address> Following a compare instruction, jump to <address> if the compare was False. AND #n Bitwise AND operation of the contents of ACC with the operand. AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>. XOR #n Bitwise XOR operation of the contents of ACC with the operand. XOR <address> Bitwise XOR operation of the contents of ACC with the contents of <address>. OR #n Bitwise OR operation of the contents of ACC with the operand. OR <address> Bitwise OR operation of the contents of ACC with the contents of <address>. <address> can be an absolute address or a symbolic address. LSL #n Bits in ACC are shifted n places to the left. Zeros are introduced on the right hand end. LSR #n Bits in ACC are shifted n places to the right. Zeros are introduced on the left hand end. IN Key in a character and store its ASCII value in ACC. OUT Output to the screen the character whose ASCII value is stored in ACC. END Return control to the operating system.

Question paper, page 15

15 9608/41/O/N/19 © UCLES 2019 [Turn over A programmer writes a program that multiplies two numbers together and outputs the result. The numbers are stored as NUMONE and NUMTWO. The programmer has started to write the program in the following table. The comment column contains explanations for some of the missing program instructions and data. Complete the program using the given instruction set. Label Op code Operand Comment LOOP: // load the value from ANSWER // add the value from NUMONE // load the value from COUNT // increment the Accumulator // is NUMTWO = COUNT ? // if false, jump to LOOP // load the value from ANSWER // output ANSWER to the screen // end of program NUMONE: 2 NUMTWO: 4 COUNT: 0 ANSWER: 0 [9]

Question paper, page 16

16 9608/41/O/N/19 © UCLES 2019 3 Software may not perform as expected. One reason for this is that a syntax error exists in the code. Identify three other reasons why software may not perform as expected. 1 … … 2 … … 3 … … [3] 4 The following table contains definitions related to testing terminology. Complete the table with the correct testing term to match the definition. Definition Term Software is tested by an in-house team of dedicated testers. … Software is tested by the customer before it is signed off. … Software is tested by a small selection of users before general release. … [3] Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every 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 Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series. Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

Mark scheme, page 1

This document consists of 19 printed pages. © UCLES 2019 [Turn over Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level COMPUTER SCIENCE 9608/41 Paper 4 Written Paper October/November 2019 MARK SCHEME Maximum Mark: 75 Published This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the details of the discussions that took place at an Examiners’ meeting before marking began, which would have considered the acceptability of alternative answers. Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for Teachers. Cambridge International will not enter into discussions about these mark schemes. Cambridge International is publishing the mark schemes for the October/November 2019 series for most Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level components.

Mark scheme, page 2

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 2 of 19 Generic Marking Principles These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alongside the specific content of the mark scheme or generic level descriptors for a question. Each question paper and mark scheme will also comply with these marking principles. GENERIC MARKING PRINCIPLE 1: Marks must be awarded in line with: • the specific content of the mark scheme or the generic level descriptors for the question • the specific skills defined in the mark scheme or in the generic level descriptors for the question • the standard of response required by a candidate as exemplified by the standardisation scripts. GENERIC MARKING PRINCIPLE 2: Marks awarded are always whole marks (not half marks, or other fractions). GENERIC MARKING PRINCIPLE 3: Marks must be awarded positively: • marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond the scope of the syllabus and mark scheme, referring to your Team Leader as appropriate • marks are awarded when candidates clearly demonstrate what they know and can do • marks are not deducted for errors • marks are not deducted for omissions • answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assessed by the question as indicated by the mark scheme. The meaning, however, should be unambiguous. GENERIC MARKING PRINCIPLE 4: Rules must be applied consistently e.g. in situations where candidates have not followed instructions or in the application of generic level descriptors.

Mark scheme, page 3

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 3 of 19 GENERIC MARKING PRINCIPLE 5: Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may be limited according to the quality of the candidate responses seen). GENERIC MARKING PRINCIPLE 6: Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or grade descriptors in mind.

Mark scheme, page 4

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 4 of 19 Question Answer Marks 1(a)(i) 1 mark for each correct Activity and time • B 3 • C 10 (following B) • D 7 (following B) • E 3 (following C and D) • G 2 (following F) • H 2 (following F) 6 1(a)(ii) The shortest time to complete the project // the sequence of activities that must be completed to avoid delaying the project 1 1(a)(iii) 1 mark for identify, max 1 for description • GANTT • A table that has time across the top and activities on the left, boxes are coloured to show dependencies and find critical path // colour in the boxes to show the length of time for each task 2 1 2 3 5 8 6 9 4 7 A 1 F 1 B 3 C 10 A 1 D 7 H 2 G 2

Mark scheme, page 5

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 5 of 19 Question Answer Marks 1(b)(i) A, B, C and D in correct places with no alteration to start and end pointer A B D C 1 1(b)(ii) 1 mark per bullet point • correct jobs in correct order« • « correct location of start pointer • « correction location of new end pointer F G H D C E 3 1(b)(iii) 1 mark from: • An error message would be generated 1 Start Pointer End Pointer Start Pointer End Pointer

Mark scheme, page 6

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 6 of 19 Question Answer Marks 1(b)(iv) 1 mark for each correct line FUNCTION Remove RETURNS STRING DECLARE PrintJob : STRING IF StartPointer = EndPointer THEN RETURN "Empty" ELSE PrintJob ← Queue[StartPointer] IF StartPointer = 5 THEN StartPointer ← 0 ELSE StartPointer ← StartPointer + 1 ENDIF RETURN PrintJob ENDIF ENDFUNCTION 4 1(b)(v) 1 mark per bullet point • A stack is Last In First Out (LIFO) while a queue is First In First Out (FIFO) • The queue removes and returns the element at start pointer // item is removed from the start/head // • A stack would remove and return the element at end pointer // item is removed from the end 2

Mark scheme, page 7

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 7 of 19 Question Answer Marks 1(c) 1 mark for each correct transition with arrow 5 Printer idle Printer active Job unsuccessful Print job received Print job successful Print job sent Print job in progress Timeout Error message Print job in progress Check print queue Print job added to queue Start

Mark scheme, page 8

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 8 of 19 Question Answer Marks 1(d)(i) 1 mark per bullet • Way of modelling logic • Show all possible outputs // shows every possible outcome // all outcomes « • « based on the inputs • Determine which action to take in specific conditions // how different conditions affect the actions/outcomes 2 1(d)(ii) 1 mark for each row Accept Y/X/ticks as long as clear which are Y. Accept N/X/– for empty spaces Rules Conditions Document printed, but quality is poor Y Y Y Y N N N N Error light is flashing on printer Y Y N N Y Y N N Document printed, but paper size is incorrect Y N Y N Y N Y N Actions Check connection from computer to printer X Check ink status X X X X Check if there is a paper jam X Check paper size selected X X X X 4

Mark scheme, page 9

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 9 of 19 Question Answer Marks 1(d)(iii) 1 mark each for each correct column Accept –/X for empty spaces. Accept Y/X/Ticks as long as clear which are used Rules Conditions Document printed, but quality is poor Y Y N N N Error light is flashing on printer Y N Document printed, but paper size is incorrect Y N Y N N Actions Check connection from computer to printer X Check ink status X X Check if there is a paper jam X Check paper size selected X X 5

Mark scheme, page 10

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 10 of 19 Question Answer Marks 1(e)(i) 1 mark per bullet point to max 4 • Method header and close (where necessary) with three parameters • Initialised PrintID, FirstName, LastName and Credits « • « to the parameters • Initialised Credits to 50 PYTHON def__init__(self, NewFN, NewLN, NewPrintID): self.__PrintID = NewPrintID self.__FirstName = NewFN self.__LastName = NewLN self.__Credits = 50 PASCAL Constructor NewPrintAccount.Create(NewFN, NewLN, NewPrintID); begin PrintID := NewPrintID; FirstName = NewFN; LastName = NewLN; Credits := 50; end; VB Public Sub New(NewFN, NewLN, NewPrintID As String) PrintID = NewPrintID FirstName = NewFN LastName = NewLN Credits = 50 End Sub 4

Mark scheme, page 11

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 11 of 19 Question Answer Marks 1(e)(ii) 1 mark per bullet point • method/procedure header (and close where appropriate) taking a parameter • FirstName is set to parameter PYTHON def __SetFirstName(self, NewFirstName): self.__FirstName = NewFirstName PASCAL procedure SetFirstName(newFirstName : String); begin FirstName := newFirstName; end; VB public sub SetFirstName(NewFirstName As String) FirstName = NewFirstName End Sub 2

Mark scheme, page 12

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 12 of 19 Question Answer Marks 1(e)(iii) 1 mark per bullet point • concatenates FirstName, space and LastName « • « function/method header without parameter and returns (generated) value PYTHON def __GetName(self): return(self.__FirstName + " " + self.__LastName) PASCAL function GetName(); begin result := FirstName + " " + LastName end; VB public function GetName() As String return(FirstName & " " & LastName) End Function 2

Mark scheme, page 13

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 13 of 19 Question Answer Marks 1(e)(iv) 1 mark per each correct bullet point from: • Procedure/method header and close (where necessary) passing MoneyInput • At least 3 constants (e.g. freecredit10, freecredit20, twenty, 10, creditperdollar) • If MoneyInput<10 calculate MoneyInput * 25 • If MoneyInput >9 and MoneyInput <20 then calculate MoneyInput * 25 + 25 • If MoneyInput >19 then calculate MoneyInput * 25 + 50 • All three correct calculations add to Credits, not overwrite • Efficient IF (i.e. elseif) PYTHON def __AddCredits(self, MoneyInput): CreditPerDollar = 25 FreeCredit10 = 25 FreeCredit20 = 50 Twenty = 20 Ten = 10 if MoneyInput >= Twenty: Credits = Credits + (MoneyInput * CreditPerDollar) + FreeCredit20 elif MoneyInput >= Ten: Credits = Credits + (MoneyInput * CreditPerDollar) + FreeCredit10 else: Credits = Credits + (MoneyInput * CreditPerDollar) 6

Mark scheme, page 14

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 14 of 19 Question Answer Marks 1(e)(iv) PASCAL procedure AddCredits(MoneyInput : Real); const CreditPerDollar = 25 const FreeCredit10 = 25 const FreeCredit20 = 50 const Twenty = 20 const Ten = 10 begin If MoneyInput > = Twenty Then Credits := Credits + (MoneyInput * CreditPerDollar) + FreeCredit20; Else If MoneyInput > = Ten Then Credits := Credits + (MoneyInput * CreditPerDollar) + FreeCredit10; Else Credits := Credits + (MoneyInput * CreditPerDollar); end; VB.NET Public Sub AddCredits(MoneyInput As Integer) Const CreditPerDollar As Integer = 25 Const FreeCredit10 As Integer = 25 Const FreeCredit20 AS integer = 50 Const Twenty As Integer = 20 Const Ten AS Integer = 10 If MoneyInput > = Twenty Then Credits = Credits + (MoneyInput * CreditPerDollar) + FreeCredit20 Else If MoneyInput > = Ten Then Credits = Credits + (MoneyInput * CreditPerDollar) + FreeCredit10 Else Credits = Credits + (MoneyInput * CreditPerDollar) End If End Sub

Mark scheme, page 15

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 15 of 19 Question Answer Marks 1(e)(v) 1 mark per bullet • Declaring StudentAccounts as array of 1000 elements« • «of type PrintAccount DECLARE StudentAccounts ARRAY[0:999] OF PrintAccount 2

Mark scheme, page 16

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 16 of 19 Question Answer Marks 1(e)(vi) 1 mark per bullet point to max 8 • Generating ID with ‘1’ at the end all in lowercase from parameters • Loop through array to last occupied element « • « Check if the PrintID already exists • « using GetPrintID() • « increment number at end of PrintID • Create a new instance of PrintAccount « • « sending FirstName, LastName, PrintID as parameters • adding new account to StudentAccounts at position NumberStudents • Increment NumberStudents VB.NET Sub CreateId(firstName, lastName) Dim count As Integer Dim PrintID = Left(firstname, 3).ToLower & Left(lastname, 3).ToLower & “1” Dim studentAdd As Integer = 0 If numberStudents <> 0 Then For x = 0 To numberStudents - 1 If studentAccounts(x).getPrintID() = username Then PrintID = PrintID + 1 username = Left(firstname, 3).ToLower & Left(lastname, 3).ToLower & PrintID.ToString End If Next studentAdd = numberStudents End If studentAccounts(studentAdd) = New printAccount(firstname, lastname, username) numberStudents = numberStudents + 1 8

Mark scheme, page 17

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 17 of 19 Question Answer Marks 1(e)(vi) Python def CreateID(firstname, lastname): count = 0 PrintID = firstname[0:3].lower() + lastname[-3].lower() + "1" StudentAdd = 0 if numberStudents != 0: for x in range(0, numberStudents): if studentAccounts[x].getPrintID() == username: PrintID = PrintID + 1 username = firstname[0:3].lower() + lastname[0:3].lower + str(PrintID) studentAdd = numberStudents studentAccounts[studentAdd] = printAccount(firstname, lastname, username) numberStudents = numberStudents + 1 Pascal procedure CreateID(firstname : String, lastname: String); var count : Integer; studentAdd : Integer; PrintID : String; begin studentAdd := 0; PrintID := LowerCase(substr(firstname,0,3)) + LowerCase(substr(lastname,0,3))+ "1"; if numberStudents <> 0: ror x := 0 To numberStudents - 1; if studentAccounts[x].getPrintID() = username: PrintID := PrintID + 1; username := LowerCase(substr(firstname, 3) + LowerCase(substr(lastname,0,3))+str(PrintID); studentAdd := numberStudents; studentAccounts[studentAdd] := printAccount.Create(firstname, lastname, username); numberStudents := numberStudents + 1

Mark scheme, page 18

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 18 of 19 Question Answer Marks 2 1 mark for each highlighted section Label Op Code Operand Comment LOOP: LDD ANSWER // Load the value from ANSWER ADD NUMONE // Add the value from NUMONE [1] STO ANSWER [1] LDD COUNT // Load the value from COUNT [1] INC ACC // Increment the Accumulator [1] STO COUNT [1] CMP NUMTWO // Is NUMTWO = COUNT? [1] JPN LOOP // If false, jump to LOOP [1] LDD ANSWER // Load the value from ANSWER [1] OUT // output ANSWER to the screen [1] END // End of program NUMONE: 2 NUMTWO: 4 COUNT: 0 ANSWER: 0 9

Mark scheme, page 19

9608/41 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 19 of 19 Question Answer Marks 3 1 mark per bullet point to max 3 • Logic error // it is programmed incorrectly • There was an error in the design // the correct requirements were not stated • Run-time error // division by 0 // stack overflow // end of file reached // library not available // linking/loading error • Not adequately/correctly tested 3 Question Answer Marks 4 1 mark for each term. Definition Term Software is tested by an in-house team of dedicated testers. Alpha testing/black-box/white-box Software is tested by the customer before it is signed off. Acceptance testing Software is tested by a small selection of users before general release Beta testing 3

What you needed in this session

Cambridge’s own grade thresholds for 2019 Oct/Nov, Paper 4 · Variant 1. A higher threshold means an easier paper — the bar moves with how the cohort did.

A57/75
B48/75
C41/75
D34/75
E28/75