Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/imperative-programming-resit/3/b/solution

The linked list node needs mutable fields for changing a stored number and rearranging links:
class Node(var name: String, var number: String, var next: Node)
The implementation will keep its real linked list nodes private to the Book object and will not return linked list node references to clients.

New to topics? Read the docs here!