The repair workshop uses the tablet display in Fig. 1 for bicycle inspections. A mechanic enters a repair ticket, wheel diameter, number of faults and wheth...

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

Question 1 Report

9210-p1-data-types-11

The repair workshop uses the tablet display in Fig. 1 for bicycle inspections. A mechanic enters a repair ticket, wheel diameter, number of faults and whether the bicycle is safe to collect. The ticket is used to retrieve a record, while wheel diameter helps select a replacement part. The main program calls a subroutine that rejects values with the wrong data type before the record is saved.

(a) When wheel diameter is 26.5 inches, state a suitable data type. [1]
(b) Explain why repair ticket R0031 should be stored as a string. [2]
(c) When safeToCollect is stored, state a suitable data type. [1]

Answer Details

(a) Wheel diameter should be a real (floating-point) number because 26.5 includes a decimal value. [1]

(b) R0031 should be a string: it contains a letter and leading zeroes, and it is a reference used to find a record rather than a value for arithmetic. Storing it numerically could lose the zeroes. [2]

(c) safeToCollect should be Boolean because the bicycle is either safe to collect or not safe to collect. [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