Question 2
OCR Computer Science June 2018 Paper 1AS10 marks
On the specification
- (a)
- 1.1 The characteristics of contemporary processors, input, output and storage devices
- (b)
- 2.2 Problem solving and programming
- (c)(i)
- 1.2 Software and software development
- (c)(ii)
- 1.3 Exchanging data
- (c)(iii)
- 1.2 Software and software development
Question text
2 An electricity company is looking at ways of getting meter readings from its customers. It releases an application for smartphones which allows users to submit their meter reading (a 6 digit number). (a) Describe one method in which a user could enter the meter reading into the smartphone application. [2] (b) JavaScript is used to check that a reasonable value is being entered before a meter reading is sent to a server. When the user enters a meter reading number, the function validateReading is called. If the number entered is a valid number between 1 and 999999 inclusive, it returns true otherwise it returns false. You will need to use the JavaScript function isNaN() standing for “is not a number”. This returns true if the value it is given is not a number and false if it is. isNaN(computer4) returns true isNaN(203) returns false Complete the function function validateReading(reading) { } [4] (c) The electricity company decides to trial smart meters. These can be connected to a computer so the user can download and analyse records of their electricity usage. (i) In order to be able to access all the functionality of the meter, the computer needs a device driver. Describe what is meant by the term ‘device driver’. [2] (ii) In order to transfer data, the meter and computer need an established set of rules for how they will communicate. State the term used for a set of rules for communication between two devices. [1] (iii) Once downloaded, the user can analyse the data. State the type of application that the user might use to analyse the data once downloaded. [1]