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, numb...

Assessment: Computer Science 9210 | Paper 1 Mock 01 | Programming (on-screen) Subject: Computer Science - 9210

Question 1 Report

9210-p1-data-types-7

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]

Answer Details

(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]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning