Question 1 Report
A marine research team uses the dashboard in Fig. 1 to log observations from a boat. For each sighting, the observer records species code, water depth, number of animals and whether a photograph was taken. The code is displayed in a report, whereas the number of animals is added to a running total. The program includes an input test before it stores the record.
(a) When water depth is 14.2 m, state a suitable data type. [1]
(b) Explain why photoTaken can be stored using less memory than speciesCode. [2]
(c) When the number of animals is stored, state a suitable data type. [1]
(a) Water depth should be a real (floating-point) number because 14.2 m has a fractional part. [1]
(b) photoTaken has only two possible values, true or false. It can therefore use a Boolean, which requires less storage than a multi-character species-code string. [2]
(c) The number of animals should be an integer because animals are counted as whole items and added to a total. [1]
Everything you need to excel in your exams