Note AcademyNote Academy

Computer Science (AS & A Level) · May / June 2025 · Paper 41 · Question 3

9618

As printed in the paper

The question as text

A program stores data in a binary tree that is designed using Object‑Oriented Programming (OOP). The tree stores data in ascending numerical order, for example: 30 20 45 63 33 1 21 The class Node stores data about the nodes. Node NodeData : Integer LeftNode : Node RightNode : Node stores the node’s integer data stores the node that is stored to the left of the current node, or a null value if there is no node to the left stores the node that is stored to the right of the current node, or a null value if there is no node to the right Constructor() GetLeft() GetRight() GetData() SetLeft() SetRight() initialises NodeData to its parameter value; initialises LeftNode and RightNode to a null value returns LeftNode returns RightNode returns NodeData takes an object of type Node as a parameter and stores it in LeftNode takes an object of type Node as a parameter and stores it in RightNode

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 3(a)(i)[4]

  • 3(a)(ii)[3]

  • 3(a)(iii)[3]

  • 3(b)[2]

  • 3(c)(i)[2]

  • 3(c)(ii)[1]

  • 3(c)(iii)[6]

  • 3(d)[5]

  • 3(e)(i)[3]

  • 3(e)(ii)[1]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.