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]
(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]
Everything you need to excel in your exams