9618/41 · May/June 2026 · Worked solutions

Step-by-step solutions based on the mark scheme (not a mark-scheme dump).

Question 1

Part 1(a) — solution

  1. (Global) array of 10 integers
  2. (Global) head pointer and tail pointer both initialised to –1
  3. Queue values are initialised to –1

Visual Basic (VB.NET)

Dim Queue(9) As Integer
                   Dim HeadPointer As Integer
                   Dim TailPointer As Integer
                   Sub Main(args As String())
                        HeadPointer = -1
                        TailPointer = -1

                        For x = 0 To 9
                             Queue(x) = -1
                        Next
                   End Sub

Python

Queue = []
                   HeadPointer = -1
                   TailPointer = -1
                   for x in range(10):
                        Queue.append(-1)

Mark points

  • (Global) array of 10 integers
  • (Global) head pointer and tail pointer both initialised to –1
  • Queue values are initialised to –1

Part 1(b) — solution

  1. Enqueue header taking 1 (integer) parameter
  2. Checking if the queue is full …
  3. … returning False
  4. (otherwise) Storing parameter in tail pointer +1
  5. Incrementing tail pointer
  6. … returning True
  7. Dealing with first element and changing head pointer to be 0

Visual Basic (VB.NET)

Function Enqueue(DataValue As Integer)
                      If TailPointer < 9 Then
                           TailPointer = TailPointer + 1
                           Queue(TailPointer) = DataValue
                           If HeadPointer = -1 Then
                               HeadPointer = 0
                           End If
                           Return True
                      Else
                           Return False
                      End If End
                  Function

                University Press & Assessment 2026                                                                       Page 9 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                   9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

def Enqueue(Data):
                        global Queue
                        global TailPointer
                        global HeadPointer
                        if TailPointer < 9:
                            TailPointer = TailPointer + 1
                            Queue[TailPointer] = Data
                            if HeadPointer == -1:
                                 HeadPointer = 0
                            return True
                        else:
                            return False

Mark points

  • Enqueue header taking 1 (integer) parameter
  • Checking if the queue is full …
  • … returning False
  • (otherwise) Storing parameter in tail pointer +1
  • Incrementing tail pointer
  • … returning True
  • Dealing with first element and changing head pointer to be 0

Part 1(c)(i) — solution

  1. Taking 11 (integer) values as input
  2. … calling Enqueue() with each input
  3. Checking/storing return value …
  4. … output message if False is returned
  5. Output content of array in any form

Visual Basic (VB.NET)

Dim Returned As Boolean
                  For x = 0 To 10
                       Console.WriteLine("Enter a number ")
                       Returned = Enqueue(Console.ReadLine())
                       If Not Returned Then
                           Console.WriteLine("Queue full")
                       End If
                  Next

Python

for x in range(11):
                        Returned = Enqueue(int(input("Enter a number ")))
                        if not(Returned):
                            print("Queue full")
                   print(Queue)

Mark points

  • Taking 11 (integer) values as input
  • … calling Enqueue() with each input
  • Checking/storing return value …
  • … output message if False is returned
  • Output content of array in any form

Part 1(c)(ii) — solution

1 mark for ss showing inputs and output 1 e.g. University Press & Assessment 2026 Page 13 of 41 Trace ID: PC-250D51A797 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge 9618/41 Mark Scheme June · papacambridge.com 2026 | Source: papacambridge.com 9618/41 Mark Scheme June 2026 Downloaded from PapaCambridge - https://papacambridge.com/ 9618/41 Cambridge International AS & A Level – Mark Scheme May/June 2026 Guidance

Mark points

  • Include the ideas shown in the solution above.

Part 1(d) — solution

  1. Dequeue header taking no parameter
  2. Checking if queue is empty (e.g. TailPointer == -1 or HeadPointer > TailPointer) …
  3. … returning –1
  4. (otherwise) accessing data at head pointer …
  5. … and returning
  6. Incrementing HeadPointer (before any return)

Visual Basic (VB.NET)

Function Dequeue()
                           Dim ReturnValue As Integer
                           If HeadPointer > -1 And HeadPointer <= TailPointer Then
                               ReturnValue = Queue(HeadPointer)
                               HeadPointer = HeadPointer + 1
                               Return ReturnValue
                           Else
                               Return -1
                           End If End
                        Function

Python

def Dequeue():
                        global Queue
                        global HeadPointer
                        global TailPointer
                        if HeadPointer > -1 and HeadPointer <= TailPointer:
                            ReturnValue = Queue[HeadPointer]
                            HeadPointer = HeadPointer + 1
                            return ReturnValue
                        else:
                            return -1

Mark points

  • Dequeue header taking no parameter
  • Checking if queue is empty (e.g. TailPointer == -1 or HeadPointer > TailPointer) …
  • … returning –1
  • (otherwise) accessing data at head pointer …
  • … and returning
  • Incrementing HeadPointer (before any return)

Part 1(e)(i) — solution

  1. Taking 6 integers as input and storing in the queue
  2. Calling Dequeue() 4 times and storing/using return value
  3. Outputs each removed element from the queue

Visual Basic (VB.NET)

For x = 0 To 5
                           Console.WriteLine("Enter a number ")
                           Returned = Enqueue(Console.ReadLine())
                      Next
                      Dim ReturnValue As Integer = -1
                      For x = 0 To 3
                           ReturnValue = Dequeue()
                           Console.WriteLine(ReturnValue)
                      Next

Python

for x in range(6):
                        returnValue = Enqueue(int(input("Enter a number ")))
                   for x in range(4):
                        returnValue = Dequeue()
                        print(returnValue)

Mark points

  • Taking 6 integers as input and storing in the queue
  • Calling Dequeue() 4 times and storing/using return value
  • Outputs each removed element from the queue

Part 1(e)(ii) — solution

1 mark for ss showing inputs and output 1 e.g. University Press & Assessment 2026 Page 17 of 41 Trace ID: PC-250D51A797 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge 9618/41 Mark Scheme June · papacambridge.com 2026 | Source: papacambridge.com 9618/41 Mark Scheme June 2026 Downloaded from PapaCambridge - https://papacambridge.com/ 9618/41 Cambridge International AS & A Level – Mark Scheme May/June 2026 Guidance

Mark points

  • Include the ideas shown in the solution above.

Question 2

Part 2(a) — solution

  1. Record structure / class with identifier ToyRecord constructor for
  2. Four fields declared/initialised MP1

Visual Basic (VB.NET)

Structure ToyRecord
                       Dim ToyName As String
                       Dim NumberBricks As Integer
                       Dim Difficulty As String
                          Dim Category As
                     String End Structure

                University Press & Assessment 2026                                                                       Page 18 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

class ToyRecord:
                        def   init (self, pName, pNumBricks, pDifficulty, pCategory):
                            self.ToyName = pName #string
                            self.NumberBricks = pNumBricks #integer
                            self.Difficulty = pDifficulty #string
                            self.Category = pCategory #string

Mark points

  • Record structure / class with identifier ToyRecord constructor for
  • Four fields declared/initialised MP1

Part 2(b)(i) — solution

  1. Function header taking parameter and returning populated array
  2. Exception handling with suitable output (all file handling inside try)
  3. Opening the file
  4. …closing the file in an appropriate place
  5. Looping until EOF/16 times and reading in each line
  6. Splitting data by comma (and removing new line)
  7. Creating new ToyRecord with data // updating pre-existing record
  8. Appending each record to array

Visual Basic (VB.NET)

Function ReadData(TheToys() As ToyRecord)
                      Dim TempData(3) As String
                      Dim TempRecord As ToyRecord
                      Try
                           Dim FileReader As New System.IO.StreamReader("Toys.txt")
                           While Not FileReader.EndOfStream
                               TempData = (FileReader.ReadLine()).Split(",")
                               TempRecord.ToyName = TempData(0)
                               TempRecord.NumberBricks = TempData(1)
                               TempRecord.Difficulty = TempData(2)
                               TempRecord.Category = TempData(3)
                               TheToys(NumberToys) = TempRecord
                               NumberToys = NumberToys + 1
                           End While
                           FileReader.Close()
                      Catch ex As Exception
                           Console.WriteLine("Cannot open or read from file")
                      End Try
                      Return TheToys
                  End Function

                University Press & Assessment 2026                                                                       Page 21 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

def ReadData(TheToys):
                        try:
                             TheFile = open("Toys.txt")
                             for Line in TheFile:
                                 DataSplit = (Line.strip()).split(",")
                                 TheToys.append(ToyRecord(DataSplit[0],int(DataSplit[1]), DataSplit[2], DataSplit[3]))
                             TheFile.close()
                        except:
                             print("Cannot open file")
                        return TheToys

Mark points

  • Function header taking parameter and returning populated array
  • Exception handling with suitable output (all file handling inside try)
  • Opening the file
  • …closing the file in an appropriate place
  • Looping until EOF/16 times and reading in each line
  • Splitting data by comma (and removing new line)
  • Creating new ToyRecord with data // updating pre-existing record
  • Appending each record to array

Part 2(b)(ii) — solution

  1. Procedure header, taking array parameter
  2. Looping through each array element …
  3. …outputting the data

Visual Basic (VB.NET)

Sub OutputToys(TheToys)
                       For x = 0 To NumberToys - 1
                            Console.WriteLine(TheToys(x).ToyName & " " & TheToys(x).NumberBricks & " " &
                   TheToys(x).Difficulty & " " & TheToys(x).Category)
                       Next
                   End Sub

Python

def OutputToys(TheToys):
                        for Item in TheToys:
                            print(Item.ToyName, Item.NumberBricks, Item.Difficulty, Item.Category)

Mark points

  • Procedure header, taking array parameter
  • Looping through each array element …
  • …outputting the data

Part 2(b)(iii) — solution

  1. Declaring array of (16 ToyRecord elements)
  2. Calling ReadData() with empty array parameter and storing return array
  3. Calling OutputToys() with returned array

Visual Basic (VB.NET)

NumberToys = 0
                  Dim TheToys(15) As ToyRecord
                  TheToys = ReadData(TheToys)
                  OutputToys(TheToys)

Python

TheToys = [] #16 elements
                  TheToys = ReadData(TheToys)
                  OutputToys(TheToys)

Mark points

  • Declaring array of (16 ToyRecord elements)
  • Calling ReadData() with empty array parameter and storing return array
  • Calling OutputToys() with returned array

Part 2(b)(iv) — solution

1 mark for screenshot showing the toy data output 1 Ignore format e.g. University Press & Assessment 2026 Page 25 of 41 Trace ID: PC-250D51A797 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge 9618/41 Mark Scheme June · papacambridge.com 2026 | Source: papacambridge.com 9618/41 Mark Scheme June 2026 Downloaded from PapaCambridge - https://papacambridge.com/ 9618/41 Cambridge International AS & A Level – Mark Scheme May/June 2026 Guidance

Mark points

  • Include the ideas shown in the solution above.

Part 2(c)(i) — solution

  1. Function header taking array of ToyRecord and returning a populated array
  2. Prompt to enter a difficulty level and reading as input …
  3. … repeatedly until valid Allow any input as
  4. Iterating through each element in array and comparing difficulty to input … long as equates to
  5. … appending those that match to the new array the 3 levels

Visual Basic (VB.NET)

Function SearchToys(TheToys)
                         Dim SelectedToys(16) As ToyRecord
                         Dim Difficulty As Integer = -1
                         Dim Choice As String
                         NumberSelected = 0

                                          While (Difficulty < 1 Or Difficulty > 3)
                                               Console.WriteLine("Enter 1 for easy, 2 for medium and 3 for expert ")
                                               Difficulty = Console.ReadLine()
                                          End While
                                          If Difficulty = 1 Then
                                               Choice = "Easy"
                                          ElseIf Difficulty = 2 Then
                                               Choice = "Medium"
                                          Else
                                               Choice = "Expert"
                                          End If

                               For x = 0 To NumberToys - 1
                                    If TheToys(x).Difficulty = Choice Then
                                        SelectedToys(NumberSelected) = TheToys(x)
                                        NumberSelected = NumberSelected + 1
                                    End If
                               Next
                               Return SelectedToys
                           End Function

                University Press & Assessment 2026                                                                       Page 27 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

def SearchToys(TheToys):
                           SelectedToys = []
                           Difficulty = -1
                           while Difficulty < 1 or Difficulty > 3:
                                 Difficulty = int(input("Enter 1 for easy, 2 for medium and 3 for expert "))
                           if Difficulty == 1:
                                 Choice = "Easy"
                           elif Difficulty == 2:
                                 Choice = "Medium"
                           else:
                             Choice = "Expert"
                           for Item in TheToys:
                                  if Item.Difficulty == Choice:
                                       SelectedToys.append(Item)
                       return SelectedToys

                University Press & Assessment 2026                                                                       Page 26 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Mark points

  • Function header taking array of ToyRecord and returning a populated array
  • Prompt to enter a difficulty level and reading as input …
  • … repeatedly until valid Allow any input as
  • Iterating through each element in array and comparing difficulty to input … long as equates to
  • … appending those that match to the new array the 3 levels

Part 2(c)(ii) — solution

  1. Procedure header taking array of type ToyRecord, opening and closing text file
  2. Looping through array and formatting the data correctly
  3. …writing each line to the file
  4. Exception handling with suitable catch and output

Visual Basic (VB.NET)

Sub WriteToys(TheToys)
                          Dim TextToWrite As String = ""
                          Try
                              Dim FileWriter As New System.IO.StreamWriter("SelectedToys.txt")
                              For x = 0 To NumberSelected - 1
                                   TextToWrite = TheToys(x).ToyName & "," & TheToys(x).NumberBricks & "," &
                    TheToys(x).Difficulty & "," & TheToys(x).Category
                                   FileWriter.WriteLine(TextToWrite)
                              Next
                              FileWriter.Close()
                          Catch ex As Exception
                              Console.WriteLine("Cannot open or read from file")
                          End Try
                      End Sub

                University Press & Assessment 2026                                                                       Page 29 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

def WriteToys(TheToys):
                         try:
                            TheFile = open("SelectedToys.txt", 'w')
                            for Item in TheToys:
                                  LineToWrite = Item.ToyName + "," + str(Item.NumberBricks) + "," + Item.Difficulty + "," +
                  Item.Category + "\n"
                                  TheFile.write(LineToWrite)
                              TheFile.close()
                         except:
                              print("Cannot write to file")

Mark points

  • Procedure header taking array of type ToyRecord, opening and closing text file
  • Looping through array and formatting the data correctly
  • …writing each line to the file
  • Exception handling with suitable catch and output

Part 2(c)(iii) — solution

  1. Calling SearchToys() with populated array and storing return array
  2. Calling WriteToys() with returned array

Visual Basic (VB.NET)

Dim SelectedToys(15) As ToyRecord
                   SelectedToys = SearchToys(TheToys)
                   WriteToys(SelectedToys)

Python

SelectedToys = []
                   SelectedToys = SearchToys(TheToys)
                   WriteToys(SelectedToys)

Mark points

  • Calling SearchToys() with populated array and storing return array
  • Calling WriteToys() with returned array

Part 2(c)(iv) — solution

1 mark for screenshot of text file with correct name and content 1 Ignore format, check content e.g. University Press & Assessment 2026 Page 31 of 41 Trace ID: PC-250D51A797 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge 9618/41 Mark Scheme June · papacambridge.com 2026 | Source: papacambridge.com 9618/41 Mark Scheme June 2026 Downloaded from PapaCambridge - https://papacambridge.com/ 9618/41 Cambridge International AS & A Level – Mark Scheme May/June 2026 Guidance

Mark points

  • Include the ideas shown in the solution above.

Question 3

Part 3(a)(i) — solution

  1. Class declaration (and end) with attributes
  2. Constructor header (and end)
  3. … taking 2 parameters …
  4. … assigning parameters to attributes

Visual Basic (VB.NET)

Class TheObject
                       Public ObjectType As String
                       Public Amount As Integer
                       Sub New(pType, pAmount)
                           ObjectType = pType
                           Amount = pAmount
                       End Sub
                   End Class

Python

class TheObject:
                        def    init (self, pType, pAmount):
                            self.ObjectType = pType #string
                            self.Amount = pAmount #integer

Mark points

  • Class declaration (and end) with attributes
  • Constructor header (and end)
  • … taking 2 parameters …
  • … assigning parameters to attributes

Part 3(a)(ii) — solution

  1. Class header (and end) and attributes including array
  2. Constructor taking 1 parameter and storing in NumberSpaces…
  3. … initialising empty objects to 100 spaces in BoardArray
  4. Get method with no parameter, returning attribute

Visual Basic (VB.NET)

Class Path
                         Private BoardArray(99) As TheObject
                         Private NumberSpaces As Integer

                                          Sub New(pNumberSpaces)
                                              For x = 0 To 99
                                                   BoardArray(x) = New TheObject("", -1)
                                              Next
                                              NumberSpaces = pNumberSpaces
                                          End Sub

                               Function
                                   GetNumberSpaces()
                                   Return NumberSpaces
                               End Function
                           End Class

                University Press & Assessment 2026                                                                       Page 33 of 41

Trace ID: PC-250D51A797
Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable.
Licensed for hosting on papacambridge.com only.
PapaCambridge
9618/41 Mark  Scheme June ·     papacambridge.com
                             2026 | Source:    papacambridge.com                                                                                    9618/41 Mark Scheme June 2026
Downloaded from PapaCambridge - https://papacambridge.com/

               9618/41                                                                                          Cambridge International AS & A Level – Mark Scheme                          May/June 2026

                      Guidance

Python

class Path:
                        def    init (self, pNumberSpaces):
                            self. BoardArray = [] #100 TheObject
                            self. NumberSpaces = pNumberSpaces #int
                            for Number in range(100):
                                 self. BoardArray.append(TheObject("",-1))
                        def GetNumberSpaces(self):
                             return self. NumberSpaces

Mark points

  • Class header (and end) and attributes including array
  • Constructor taking 1 parameter and storing in NumberSpaces…
  • … initialising empty objects to 100 spaces in BoardArray
  • Get method with no parameter, returning attribute

Part 3(a)(iii) — solution

  1. Method header taking array as parameter
  2. If more elements, returning FALSE
  3. (otherwise) storing parameter elements in array and returning TRUE

Visual Basic (VB.NET)

Function InitialiseData(TheArray())
                          Dim ALength As Integer = TheArray.Length
                          If ALength > NumberSpaces Then
                              Return False
                          End If

                               For x = 0 To ALength - 1
                                    BoardArray(x) = TheArray(x)
                               Next
                               Return True
                           End Function

Python

def InitialiseData(self, TheArray):
                            ALength = len(TheArray)
                            if ALength > self. NumberSpaces:
                                 return False
                            for x in range(len(TheArray)):
                                 self. BoardArray[x] = TheArray[x]
                            return True

Mark points

  • Method header taking array as parameter
  • If more elements, returning FALSE
  • (otherwise) storing parameter elements in array and returning TRUE

Part 3(a)(iv) — solution

  1. Method header and returning string
  2. Creating string of all not null path objects type and amount

Visual Basic (VB.NET)

Function ReturnPath()
                       Dim ReturnString As String = ""
                       Dim TempString As String = ""
                       For x = 0 To NumberSpaces - 1
                            TempString = BoardArray(x).ObjectType & "-" & (BoardArray(x).Amount).ToString + " "
                            ReturnString = ReturnString + TempString
                       Next

                       Return ReturnString
                   End Function

Python

def ReturnPath(self):
                        ReturnString = ""
                        for x in range(self. NumberSpaces):
                            TempString = self. BoardArray[x].ObjectType + "-" + str(self.                                                                                   BoardArray[x].Amount) + " "
                            ReturnString = ReturnString + TempString
                        return ReturnString

Mark points

  • Method header and returning string
  • Creating string of all not null path objects type and amount

Part 3(a)(v) — solution

  1. Method header (and end) taking one parameter and returning array element at parameter the integer or

Visual Basic (VB.NET)

Function GetPathObject(TheIndex)
                       If (TheIndex >= NumberSpaces - 1) Then
                           TheIndex = NumberSpaces - 1
                       End If
                       Return BoardArray(TheIndex)
                   End Function

Python

def GetPathObject(self, TheIndex):
                            if(TheIndex >= NumberSpaces – 1):
                                 TheIndex = self. NumberSpaces - 1
                            return self. BoardArray[TheIndex]

Mark points

  • Method header (and end) taking one parameter and returning array element at parameter the integer or

Part 3(b)(i) — solution

  1. Creating 5 objects of type TheObject
  2. …with correct values …
  3. … and storing in ArrayOfObjects
  4. Creating new instance of Pathwith 5 elements
  5. Calling InitialiseData for the path with ArrayOfObjects
  6. Outputting the path using return path

Visual Basic (VB.NET)

Dim ArrayOfObjects(4) As TheObject
                  ArrayOfObjects(0) = New TheObject("Money", 50)
                  ArrayOfObjects(1) = New TheObject("Experience", 100)
                  ArrayOfObjects(2) = New TheObject("Money", 200)
                  ArrayOfObjects(3) = New TheObject("Money", 20)
                  ArrayOfObjects(4) = New TheObject("Experience", 30)
                  Dim Path1 As Path = New Path(5)
                  Path1.InitialiseData(ArrayOfObjects)
                  Console.WriteLine(Path1.ReturnPath())

Python

ArrayOfObjects = []
                  ArrayOfObjects.append(TheObject("Money",50))
                  ArrayOfObjects.append(TheObject("Experience",100))
                  ArrayOfObjects.append(TheObject("Money",200))
                  ArrayOfObjects.append(TheObject("Money",20))
                  ArrayOfObjects.append(TheObject("Experience",30))
                  Path1 = Path(5)
                  Path1.InitialiseData(ArrayOfObjects)
                  print(Path1.ReturnPath())

Mark points

  • Creating 5 objects of type TheObject
  • …with correct values …
  • … and storing in ArrayOfObjects
  • Creating new instance of Pathwith 5 elements
  • Calling InitialiseData for the path with ArrayOfObjects
  • Outputting the path using return path

Part 3(b)(ii) — solution

1 mark for screenshot showing the path 1 e.g. University Press & Assessment 2026 Page 41 of 41 Trace ID: PC-250D51A797 Re-uploading, mirroring or re-hosting this file on any other website or domain is unauthorised and traceable. Licensed for hosting on papacambridge.com only. PapaCambridge 9618/41 Mark Scheme June · papacambridge.com 2026 | Source: papacambridge.com 9618/41 Mark Scheme June 2026 Downloaded from PapaCambridge - https://papacambridge.com/

Mark points

  • Include the ideas shown in the solution above.