Question 3

OCR Computer Science June 2018 Paper 2AS10 marks

On the specification

(a)(i)
2.1 Elements of computational thinking
(a)(ii)
2.1 Elements of computational thinking
(a)(iii)
2.1 Elements of computational thinking
(b)(i)
2.3 Algorithms
(b)(ii)
2.3 Algorithms
Question text

3 A country’s national rail operator wants to represent their rail network on a computer system to keep track of the location of trains, and any problems on the network. After studying the rail network, the operator uses abstraction to create the virtual representation. (a) (i) Define the term ‘abstraction’. [1] (ii) Identify two reasons why abstraction is needed in the rail network program. 1 2 [2] (iii) Describe one potential difference between the virtual and real rail network. [2] (b) The rail operator provides an app for customers to purchase tickets. An array is used to store the names of the stations on the network. Customers must enter a departure station into the app. The current contents of the array are shown: Council Cavalry Bridge Walkway Museum Monument Theatre Cinema House A linear search is used to check if the entered departure station exists in the array. (i) Identify one precondition that is needed before a binary search could be used with the station array. [1] (ii) A user enters the departure station “Bridge Heights”. Explain how a linear search would check if the departure station exists in the array. [4]