Skip to content
csH2019paper
Share
Explore
section 2

icon picker
q-11 software development

2019 computing science higher SQA paper

about this question

This question features a requirement for a find max algorithm. Here is what you need to do:
standard algorithm: find max,
records and array of records

You can run and edit code on this page to explore the question and better understand the concepts

question introduction

A car manufacturer includes an event data recorder in their cars. This device begins recording when the car’s sensors detect a sudden change in speed. The data captured can be analysed when required. A sample of data is shown below.
Event dataSample
-----------------+------------
speed (mph) 58.2
accelerator (%) 42
brake (%) 0
seatbelt on True
When triggered by a sensor this data is sampled 10 times per second for 20 seconds.
Software is to be developed that can analyse the data captured from a car’s event data recorder.

part a

During the analysis stage boundaries are identified.
State two boundaries for this task.
1.
2.

answer part 2

part b (i)

Use a programming language of your choice to define a suitable record (class) data structure for the data shown above.
(edit the reading.java file in the project)
part b (ii)
Use a programming language of your choice to define a variable that can store the details of 200 readings. Use the record (class) data structure you made in part (i)
(edit the carData.java file in the project)
additional part
Create a method to read or import the values from the readings.csv file.
(edit the carData.java file in the project)
part c
Create a method to find the maximum speed (and display it)
(edit the carData.java file in the project)

Loading…

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.