Convert the paper incident form used at a small factory to a secure digital program. Supervisors enter a machine identifier, a short description, and a seve...

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

Question 1 Report

Convert the paper incident form used at a small factory to a secure digital program. Supervisors enter a machine identifier, a short description, and a severity level from 1 to 5. A technician notices that descriptions copied from another system can include hundreds of characters. These long entries make the incident list slow to load and can hide important text on screen. The new program must protect the database while still allowing a supervisor to describe the fault clearly.

(a) Explain why the description field should have a maximum length. [1]
(b) When a severity level of 8 is entered, state the validation that should reject it. [1]
(c) Explain why a machine identifier should be checked before the incident is saved. [1]



Table 1 shows entries made into the quantity field of an online refill-order program. The field is intended to accept whole numbers from 1 to 50. The program uses the quantity to update stock and to calculate an invoice. A test team has entered the values below before the code is released. They want to ensure that invalid data cannot cause the program to crash or create an incorrect order.

(a) Explain why the entry 2.5 should be rejected. [1]
(b) When the user enters 51, state the validation check that fails. [1]
(c) Explain why the value seven could cause an error if it is used directly in a calculation. [1]

Answer Details

Factory incident program

(a) A maximum description length limits excessive data that could disrupt display or database storage and reduce performance. [1]

(b) A range check for values from 1 to 5 should reject severity 8. [1]

(c) Check the machine identifier before saving so an incident cannot be linked to a non-existent or incorrect machine. [1]

Refill-order program

(a) 2.5 should be rejected because quantity must be a whole number, an integer, rather than a decimal. [1]

(b) 51 fails a range check because valid quantities are 1 to 50. [1]

(c) seven is text, not a numeric value. Using it directly in arithmetic can cause a type error or invalid calculation. [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