Convert the following values from the records of a solar-powered ferry to suitable data types. The ferry computer stores a route name, passengers on board, ...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

Question 1 Report

Convert the following values from the records of a solar-powered ferry to suitable data types. The ferry computer stores a route name, passengers on board, battery voltage, and a value showing whether the emergency stop is active. The values are later used by a navigation algorithm.

(a) State the data type for route name "Harbour East". [1]
(b) Give the data type for passengers on board 186. [1]
(c) State the data type for battery voltage 47.8 V. [1]
(d) Give the data type for emergency stop active. [1]
(e) State why a Boolean data type can reduce memory use compared with storing the words "active" and "inactive". [2]

Answer Details

(a) String. A route name is text. [1]

(b) Integer. Passenger count is a whole-number quantity. [1]

(c) Real or float. The voltage \(47.8\) has a decimal part. [1]

(d) Boolean. Emergency stop status has two states: active or not active. [1]

(e) A Boolean represents only two states, normally using very little storage. The words “active” and “inactive” are strings containing several characters, so they need more memory. [2]

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