Cambridge A Level Computer Science 9608 — 2018 Oct/Nov Paper 4 · Variant 2

9608/42/O/N/18 · 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 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 1 of 16
Page 1 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 2 of 16
Page 2 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 3 of 16
Page 3 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 4 of 16
Page 4 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 5 of 16
Page 5 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 6 of 16
Page 6 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 7 of 16
Page 7 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 8 of 16
Page 8 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 9 of 16
Page 9 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 10 of 16
Page 10 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 11 of 16
Page 11 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 12 of 16
Page 12 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 13 of 16
Page 13 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 14 of 16
Page 14 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 15 of 16
Page 15 of 16
Cambridge A Level Computer Science 9608 2018 Oct/Nov Paper 4 · Variant 2 question paper, page 16 of 16
Page 16 of 16

Mark scheme18 pages

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

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

Paper as text

Question paper, page 1

* 1 3 7 8 7 0 2 3 2 3 * This document consists of 15 printed pages and 1 blank page. DC (ST/SW) 148547/3 © UCLES 2018 [Turn over Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level COMPUTER SCIENCE 9608/42 Paper 4 Further Problem-solving and Programming Skills October/November 2018 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.

Question paper, page 2

2 9608/42/O/N/18 © UCLES 2018 1 A bank provides bank accounts to customers. The following pseudocode represents the operation of the bank account. CALL OpenAccount() CALL AccountLifeTime() CALL CloseAccount() PROCEDURE AccountLifeTime() REPEAT CALL Transactions() UNTIL AccountClosed() = TRUE ENDPROCEDURE PROCEDURE CloseAccount() IF ReopenAccount() = TRUE THEN CALL FlagToReopen() ELSE CALL DeletePermanently() ENDIF ENDPROCEDURE (a) Complete the JSP structure diagram for this bank account from the pseudocode given. Bank account [6]

Question paper, page 3

3 9608/42/O/N/18 © UCLES 2018 [Turn over (b) A transaction can be a credit (deposit) or a debit (withdrawal). There are two types of transaction that are credits (deposits). These are: • SWIFT payment • BACS payment There are three types of transaction that are debits (withdrawals). These are: • Debit card payment • Cheque payment • Online payment Complete the JSP structure diagram to represent these additional requirements. Transaction [4]

Question paper, page 4

4 9608/42/O/N/18 © UCLES 2018 2 A declarative language is used to represent facts and rules about dogs that perform tasks to help people. 01 type(pointer, gundog). 02 type(flushing, gundog). 03 type(retriever, gundog). 04 05 is_a(labrador, retriever). 06 is_a(newfoundland, retriever). 07 is_a(cocker_spaniel, flushing). 08 is_a(springer_spaniel, flushing). 09 is_a(king_charles, flushing). 10 is_a(english_setter, pointer). 11 is_a(irish_setter, pointer). 12 13 fav_bird(pointer, grouse). 14 fav_bird(flushing, pheasant). 15 fav_bird(retriever, waterfowl). 16 17 type(X, Y) IF is_a(Z, X) AND type(Z, Y). These clauses have the following meaning: Clause Explanation 01 A pointer is a type of gundog. 05 A labrador is an example of a retriever. 13 The favourite bird of a pointer is a grouse. 17 X is a type of Y if Z is an example of X and Z is a type of Y. (a) More facts are to be included. A standard poodle is an example of a waterdog. A waterdog is a type of gundog. Write the additional clauses to record these facts. 18 … 19 … [2]

Question paper, page 5

5 9608/42/O/N/18 © UCLES 2018 [Turn over (b) Using the variable P, the goal is_a(P, retriever) returns P = labrador, newfoundland Write the result returned by the goal is_a(H, pointer) H = … [2] (c) Write a query, using the variable W, to find out what an irish setter is an example of. … [2] (d) Y is the favourite bird of dog X. Complete the following rule: fav_bird(X, Y) IF … … [3] (e) State the value returned by the goal NOT(is_a(labrador, retriever)) … [1]

Question paper, page 6

6 9608/42/O/N/18 © UCLES 2018 3 A bubble sort algorithm is used to sort an integer array, List. This algorithm can process arrays of different lengths. (a) Write pseudocode to complete the bubble sort algorithm shown. 01 FOR Outer … TO 0 STEP - 1 02 FOR Inner 0 TO (…) 03 IF … > … 04 THEN 05 Temp … 06 List[Inner] … 07 List[Inner + 1] … 08 ENDIF 09 ENDFOR 10 ENDFOR [7] (b) (i) State the order of the sorted array. … [1] (ii) State which line of the algorithm you would change to sort the array into the opposite order. State the change you would make. Line … Change … … [1]

Question paper, page 7

7 9608/42/O/N/18 © UCLES 2018 [Turn over (c) Use pseudocode to write an alternative version of this bubble sort algorithm that will exit the algorithm when the list is fully sorted. … … … … … … … … … … … … … … … … … … … … … … … … … … [4]

Question paper, page 8

8 9608/42/O/N/18 © UCLES 2018 4 A circus is made up of performers. There are three types of performer: clown, acrobat and aerial. The following data are stored for each performer. • First name • Last name • Secondary role (that can be edited) • Stage name (that can be edited) • Type of performer (PerfType) The following statements apply to performers. • An acrobat may or may not use fire in his or her act. • An aerial performer can be one of two types: either catcher or flyer. • Each clown has an item, such as a water-spraying flower or a unicycle. • Each clown also has a musical instrument, such as a guitar or an oboe. Each of the three types of performer has a method that will display all of the information about that performer in a specific format. For example: Sally Superstar (real name Sally Smith) is an acrobat. Fire is part of Sally Superstar’s act. When not performing, Sally Superstar is a set changer. (a) Complete the following class diagram to show the attributes, methods and inheritance for the program. You do not need to write the get and set methods. Performer FirstName : STRING LastName : STRING SecondaryRole : STRING StageName : STRING PerfType : STRING Constructor() EditSecondaryRole() EditStageName() Acrobat UseFire : BOOLEAN Constructor() PerformerInfo() Clown … … Constructor() … Aerial … Constructor() … [4]

Question paper, page 9

9 9608/42/O/N/18 © UCLES 2018 [Turn over (b) Write program code for the Performer class. Programming language … Program code … … … … … … … … … … … … … … … … … … … … … … … … … [5]

Question paper, page 10

10 9608/42/O/N/18 © UCLES 2018 (c) The program will display the acrobat information as follows: Sally Superstar (real name Sally Smith) is an acrobat. Fire is part of Sally Superstar’s act. When not performing, Sally Superstar is a set changer. Write program code for the Acrobat class. Programming language … Program code … … … … … … … … … … … … … … … … … … … … … …

Question paper, page 11

11 9608/42/O/N/18 © UCLES 2018 [Turn over … … … … … … [8] (d) Information about a performer is as follows: Amazing Alex (real name Alex Tan) is an acrobat. Fire is part of Alex’s act. When not performing, Amazing Alex is a popcorn seller. (i) Write program code to create an instance of an object with the identifier Acrobat_1. All attributes of the instance should be fully initialised. … … … … [3] (ii) Explain inheritance with reference to the circus example. … … … … … … … [2]

Question paper, page 12

12 9608/42/O/N/18 © UCLES 2018 5 A Program Evaluation Review Technique (PERT) chart has been constructed for a project that is at the planning stage. 1 2 4 4 C F 2 2 5 2 6 E J 3 5 5 3 2 B D G H I K A 5 7 6 9 10 3 8 (a) Complete the following GANTT chart using the information in the PERT chart. A B C D E F G H I J K Week number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [5]

Question paper, page 13

13 9608/42/O/N/18 © UCLES 2018 [Turn over (b) There are three teams working on the project. Each team is able to work on any of the activities. Explain, with reference to the PERT chart, how work can be allocated to the three teams. … … … … … … [2] (c) The PERT chart is used to calculate the critical path for the project. (i) List the activities that form the critical path using the given PERT chart on page 12. … [1] (ii) Explain the importance of the critical path for project delivery. … … … … … [2]

Question paper, page 14

14 9608/42/O/N/18 © UCLES 2018 6 A linked list abstract data type (ADT) is created. This is implemented as an array of records. The records are of type ListElement. An example of a record of ListElement is shown in the following table. Data Item Value Country "Scotland" Pointer 1 (a) (i) Use pseudocode to write a definition for the record type, ListElement. … … … … … [3] (ii) Use pseudocode to write an array declaration to reserve space for only 15 nodes of type ListElement in an array, CountryList. The lower bound element is 1. … [2] (b) The program stores the position of the last node in the linked list in LastNode. The last node always has a Pointer value of -1. The position of the node at the head of the list is stored in ListHead. After some processing, the array and variables are in the following state. CountryList ListHead Country Pointer 1 1 "Wales" 2 LastNode 2 "Scotland" 4 3 3 -1 4 "England" 5 5 "Brazil" 6 6 "Canada" 7 7 "Mexico" 8 8 "Peru" 9 9 "China" 10 10 11 11 12 12 13 13 14 14 15 15 3

Question paper, page 15

15 9608/42/O/N/18 © UCLES 2018 A recursive algorithm searches the list for a value, deletes that value, and updates the required pointers. When a node value is deleted, it is set to empty "" and the node is added to the end of the list. A node value is deleted using the pseudocode statement CALL DeleteNode("England", 1, 0) Complete the following pseudocode to implement the DeleteNode procedure. PROCEDURE DeleteNode(NodeValue: STRING, ThisPointer : INTEGER, PreviousPointer : INTEGER) IF CountryList[ThisPointer].Value = NodeValue THEN CountryList[ThisPointer].Value "" IF ListHead = ………………………………………………………………………………………… THEN ListHead …………………………………………………………………………………………………………………………………………………………… ELSE CountryList[PreviousPointer].Pointer CountryList[ThisPointer].Pointer ENDIF CountryList[LastNode].Pointer …………………………………………………………………………………………………………… LastNode ThisPointer …………………………………………………………………………………………………………………………………………………………………………………………………… ELSE IF CountryList[ThisPointer].Pointer <> -1 THEN CALL DeleteNode(NodeValue, ………………………………………………………………………………………………………………, ThisPointer) ELSE OUTPUT "DOES NOT EXIST" ENDIF ENDIF ENDPROCEDURE [5]

Question paper, page 16

16 9608/42/O/N/18 © UCLES 2018 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 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. BLANK PAGE

Mark scheme, page 1

This document consists of 18 printed pages. © UCLES 2018 [Turn over Cambridge Assessment International Education Cambridge International Advanced Subsidiary and Advanced Level COMPUTER SCIENCE 9608/42 Paper 4 Written Paper October/November 2018 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 2018 series for most Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level components.

Mark scheme, page 2

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 2 of 18 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/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 3 of 18 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

960 © U Q 08/42 CLES 2018 uestion 1(a) 1 ma • O A • « • R • F • « Exam ark per bullet poi OpenAccount, AccountLifet «with iteration Reopen Accou FlagToReopen «with selection mple: Ca nt: AccountLifet time unt? below Clo n and DeletePe on both * ambridge Interna time and Close se Account ermanently be ational AS/A Lev PUBLISHED Page 4 of 18 Answer eAccount below elow ReopenAcc vel – Mark Sche w Bank Accou count? me nt Transacti Octob ions below ber/November 2 Mar 018 rks 6

Mark scheme, page 5

960 © U Q Q 08/42 CLES 2018 uestion 1(b) 1 ma • C • S • D • C uestion 2(a) 1 ma 18 19 2(b) 1 ma H = ark per bullet poi Credit and deb Swift and BAC Debit, Cheque Correct selection ark for each fact: type(water is_a(stand ark for each resu english_set Ca nt: bit below Tran S below Credit and Online be ns where neede dog, gundog) ardpoodle, w ult: ter, irish_s ambridge Interna nsaction t elow Debit d and no additio . waterdog). setter ational AS/A Lev PUBLISHED Page 5 of 18 Answer onal selection/ite Answer vel – Mark Sche eration me October/November 2 Mar Mar 018 rks 4 rks 2 2

Mark scheme, page 6

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 6 of 18 Question Answer Marks 2(c) 1 mark per bullet point to max 2: • is_a • (irish_setter, W) is_a(irish_setter, W) 2 2(d) 1 mark per bullet point to max 3: • is_a(X,Z) • AND • fav_bird(Z, Y). fav_bird(X, Y) IF is_a(X, Z) AND fav_bird(Z, Y). 3 2(e) NO 1 Question Answer Marks 3(a) 1 mark for each completed statement: 01 FOR Outer ← LENGTH(List)-1 TO 0 STEP -1 02 FOR Inner ← 0 TO (Outer – 1) 03 IF List[Inner] > List[Inner + 1] 04 THEN 05 Temp ← List[Inner] 06 List[Inner] ← List[Inner + 1] 07 List[Inner + 1] ← Temp 08 ENDIF 09 ENDFOR 10 ENDFOR 7 3(b)(i) Ascending (must match answer to 3(a) 1

Mark scheme, page 7

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 7 of 18 Question Answer Marks 3(b)(ii) Line 03 Change the operator in the IF statement to < or <= rather than > 1 3(c) 1 mark per bullet • Use of a (Boolean) flag« • «Remainder of bubble correct • Set flag when a swap has been made« • «Loop until a swap has not been made and then exit all loops Outer ← LENGTH(List)-1 REPEAT Inner ← 0 Swap ← FALSE REPEAT IF List[Inner] > List[Inner + 1] THEN Temp ← List[Inner] List[Inner] ← List[Inner + 1] List[Inner + 1] ← Temp Swap = TRUE ENDIF Inner ← Inner + 1 UNTIL Inner = Outer – 1 Outer ← Outer - 1 UNTIL Swap = FALSE OR Outer = 0 4

Mark scheme, page 8

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 8 of 18 Question Answer Marks 4(a) 1 mark per bullet point: • Clown has attributes Item and MusicalInstrument with appropriate data types • Aerial has attribute Role/Type with appropriate data type. • Clown and Aerial have method PerformerInfo()/DisplayInfo() or equivalent. • Acrobat, Clown and Aerial inheriting from Performer. 4 Performer FirstName: STRING LastName: STRING SecondaryRole: STRING StageName: STRING Type: STRING Constructor() EditSecondaryRole() EditStageName() Acrobat UseFire: Boolean Constructor() PerformerInfo() Clown Item: STRING MusicalInstrument: STRING Constructor() PerformerInfo() Aerial Role: STRING Constructor() PerformerInfo()

Mark scheme, page 9

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 9 of 18 Question Answer Marks 4(b) 1 mark per bullet point to max 5: 1 mark per bullet to max 4: • class declaration (and end where applicable) • declaring five attributes as private (with string data types where applicable) • (language specific) constructor method (and end where applicable) • « with five parameters • initialising five attributes « « using parameters 1 mark per bullet to max 3: • procedure header (and close) for EditSecondaryRole // procedure header (and close) for EditStageName … • «takes parameter • …EditSecondaryRole replaces SecondaryRole with parameter • …EditStageName replaces StageName with parameter Example Python: class Performer(object): def __init__(self, Firstname, Lastname, Stagename, SecondaryRole, Type): self.__FirstName = Firstname self.__LastName = Lastname self.__StageName = Stagename self.__SecondaryRole = SecondaryRole self.__PerfType = Type def EditSecondaryRole(self, NewRole): self.SecondaryRole = NewRole def EditStageName(self, NewStageName): self.StageName = NewStageName 5

Mark scheme, page 10

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 10 of 18 Question Answer Marks 4(b) Example Visual Basic: Class Performer Private FirstName As String Private LastName As String Private StageName As String Private SecondaryRole As String Private PerfType As String Public Sub New(ByVal Fname As String,ByVal Lname As String, ByVal Sname As String, ByVal SecRole As String, ByVal Type As String) FirstName = Fname LastName = Lname StageName = Sname SecondaryRole = SecRole PerfType = Type End Sub Public Sub EditSecondaryRole(ByVal Srole As String) SecondaryRole = Srole End Sub Public Sub EditStageName(ByVal Sname As String) StageName = Sname End Sub End Class

Mark scheme, page 11

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 11 of 18 Question Answer Marks 4(b) Example Pascal: type Performer = class private FirstName : String; LastName : String; StageName : String; SecondaryRole : String; PerfType : String; public Constructor init(Fname, Lname, Sname, SType, Srole: String); Procedure EditSecondaryRole(Srole: String); Procedure EditStageName(Sname: String); end; Constructor Performer.init(Fname, Lname, Sname, Stype, Srole:String); begin Firstname := Fname; Lastname := Lname; StageName := Sname; SecondaryRole := Srole; PerfType := Stype; end; Procedure Performer.EditSecondaryRole(Srole: String); begin SecondaryRole := Srole; end; Procedure Performer.EditStageName(Sname: String); begin StageName := Sname; end;

Mark scheme, page 12

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 12 of 18 Question Answer Marks 4(c) 1 mark per bullet point to max 8: • class declaration with inheritance from Performer • constructor taking five or six parameters • «call to inherited constructor « • «sending either five parameters or four with "Acrobat • UseFire declared as private Boolean • In constructor, storing value in UseFire from parameter • PerformerInfo header (and end where applicable) without any parameters • « outputs / returns • … StageName & " (real name " & FirstName & " " & SecondName & ") is an acrobat" • « "Fire is part of " & StageName & "’s act." ONLY printed when Fire is TRUE • « "When not performing, " & StageName & " is a " & SecondaryRole Example Python: class Acrobat(Performer): def __init__(self,Firstname, Lastname, Stagename, SecondaryRole, Fire): Performer.__init__(self, Firstname, Lastname, Stagename, SecondaryRole, "Acrobat") self.__UseFire = Fire def PerformerInfo(self): ReturnString = "%s (real name %s %s) is %s. " % (self. Stagename, self.Firstname, self. Lastname, Acrobat.PerfType) if(self.__UseFire): ReturnString = ReturnString + "Fire is part of %s's act. " % (self.Stagename) else: ReturnString = ReturnString + "Fire is not part of %s's act. " % (self.Stagename) ReturnString = ReturnString + "When not performing, %s is a %s" % (self.Stagename, self.SecondaryRole) return ReturnString 8

Mark scheme, page 13

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 13 of 18 Question Answer Marks 4(c) Example Visual Basic: Class Acrobat : Inherits Performer Private UseFire As Boolean Public Function PerformerInfo() as string PerformerInfo = Stagename + "(real name " + FirstName + “ “ + LastName + ") is " + PerfType + “.” IF(UseFire) THEN PerformerInfo = PerformerInfo + "Fire is part of " + Stagename + "'s act." ELSE PerformerInfo = PerformerInfo + "Fire is not part of " + Stagename + "'s act." END IF PerformerInfo = PerformerInfo + "When not performing, " + Stagename + " is a " + SecondaryRole END FUNCTION Public Sub New(ByVal Fname As String,ByVal Lname As String, ByVal Sname As String, ByVal SecRole As String, ByVal fire As String) MyBase.New(Fname, Lname, Sname, SecRole, "Acrobat") UseFire = fire End Sub End Class

Mark scheme, page 14

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 14 of 18 Question Answer Marks 4(c) Example Pascal: type Acrobat = class(Performer) private UseFire : Boolean; public Constructor init(Fname, Lname, Sname, Sfire, Srole: String, "Acrobat"); override; Function PerformerInfo() : String end; constructor Acrobat.init(Fname, Lname, Sname, Sfire, Srole:String); begin Firstname := Fname; Lastname := Lname; StageName := Sname; SecondaryRole := Srole; PerfType := "Acrobat"; UseFire := Sfire; end; Function Acrobat.PerformerInfo() : String; var ReturnString : String; begin ReturnString := Stagename + "(real name" + FirstName + " " + LastName + ") is " + PerfType; IF(UseFire) THEN ReturnString := ReturnString + "Fire is part of " + Stagename + "s act." ELSE ReturnString := ReturnString + "Fire is not part of " + Stagename + "'s act. "; ReturnString := ReturnString + "When not performing," + Stagename + " is a " + SecondaryRole; Result = ReturnString; end;

Mark scheme, page 15

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 15 of 18 Question Answer Marks 4(d)(i) 1 mark per bullet point: • Assignment to Acrobat_1 • Creates instance of Acrobat • Correct five parameter values Example Python: Acrobat_1 = Acrobat("Alex","Tan","Amazing Alex","Popcorn Seller", True) Example VB.NET: Acrobat_1 = New Acrobat("Alex","Tan","Amazing Alex","Popcorn Seller", True) Example Pascal: Acrobat_1 := Acrobat("Alex","Tan","Amazing Alex","Popcorn Seller", True) 3 4(d)(ii) 1 mark per bullet point to max 2: • Clown/Acrobat/Aerial inherit from Performer/base class // Clown/Acrobat/Aerial are the child/sub class and Performer in the parent/base/super • Clown/Acrobat/Aerial can use the attributes from Performer • Clown/Acrobat/Aerial can use the methods from Performer • Clown/Acrobat/Aerial can extend the methods in Performer 2

Mark scheme, page 16

960 © U Q 08/42 CLES 2018 uestion 5(a) 1 ma • C • F • G H • I J • K 5(b) 1 ma Exam • T • A 5 • A • A 5(c)(i) A,B,E ark per bullet C, D and E start F follows C G follows D and H follows F follows G and J follows H K follows J ark per bullet poi mple: Teams can work Any example of 5 and 6 // tasks Any example of Any example of E,H,J,K Ca at same point a nt to max 2: k on simultaneou two teams work C, D, E can be s working on sam working on depe ambridge Interna after B us/concurrent/pa king simultaneou split between dif me activities //e.g endent activities ational AS/A Lev PUBLISHED Page 16 of 18 Answer arallel tasks usly e.g. From st fferent teams g. all teams can w s // e.g. if all team vel – Mark Sche tep 3, each team work together on ms work on B, th me m can work on a n 1–2 / A, 2–3/B hen they can spl Octob different task in B lit up for CDE ber/November 2 Mar week 4, 018 rks 5 2 1

Mark scheme, page 17

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 17 of 18 Question Answer Marks 5(c)(ii) 1 mark per bullet point to max 2: Example: • If there is any delay to a task which is part of the critical path • « then the overall project will be delayed • Gives the earliest possible completion time • « this allows you to organise/allocate resources (efficiently) • Frequently recalculate the critical path « • « to see if there are any delays/new critical path has arisen • Can identify where there is slack in activities • « so they can start later without affecting the critical path 2 Question Answer Marks 6(a)(i) 1 mark per bullet point: • Declaring a record type // class etc. • Declaring Country as a string • Declaring Pointer as an integer Example: TYPE ListElement DECLARE Country : STRING DECLARE Pointer : INTEGER ENDTYPE 3

Mark scheme, page 18

9608/42 Cambridge International AS/A Level – Mark Scheme PUBLISHED October/November 2018 © UCLES 2018 Page 18 of 18 Question Answer Marks 6(a)(ii) 1 mark per bullet point: • Declaring CountryList as an array with 15 elements • Of type ListElement Example: DECLARE CountryList : ARRAY[1 : 15] OF ListElement 2 6(b) 1 mark for each completed statement PROCEDURE DeleteNode(NodeValue: STRING, ThisPointer: INTEGER, PreviousPointer: INTEGER) IF CountryList[ThisPointer].Value = NodeValue THEN CountryList[ThisPointer].Value ← "" IF ListHead = ThisPointer THEN ListHead ← CountryList[ThisPointer].Pointer ELSE CountryList[PreviousPointer].Pointer ← CountryList[ThisPointer].Pointer ENDIF CountryList[LastNode].Pointer ← ThisPointer LastNode ← ThisPointer CountryList[ThisPointer].Pointer ← −1 ELSE IF CountryList[ThisPointer].Pointer <> −1 THEN CALL DeleteNode(NodeValue,CountryList[ThisPointer].Pointer, ThisPointer) ELSE OUTPUT "DOES NOT EXIST" ENDIF ENDIF ENDPROCEDURE 5

What you needed in this session

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

A58/75
B50/75
C42/75
D35/75
E28/75