The wildlife camera program stores an image filename, date and reserve zone after each photograph is taken. A ranger runs a command that reads the log file ...

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

Question 1 Report

The wildlife camera program stores an image filename, date and reserve zone after each photograph is taken. A ranger runs a command that reads the log file and displays only records from zone C. The ranger may enter a lower-case c even though the file uses an upper-case C. The program is being tested before the cameras are installed in remote woodland.

(a) State one test datum for the zone input that would test case handling. [1]
(b) Explain how converting the entered zone to upper case can improve the search. [2]



Fig. 1 shows a recycling kiosk at a community centre. A user scans a barcode, and the program displays the material type and sends a message to the correct bin mechanism. At closing time, a subroutine writes the number of items of each type to a text file. The operator needs a clear output if the barcode cannot be found in the lookup file.

(a) State the input device used to enter the barcode. [1]
(b) Explain why the lookup file is read rather than opened for writing during normal use. [2]
(c) When no matching code is found, state one suitable output. [1]

Answer Details

Wildlife-camera program

  1. A suitable datum for testing case handling is lower-case c. [1]
  2. Converting the entered zone to upper case changes c to C, matching the format used in stored records. This means a valid record is not missed solely because of letter case. [2]

Recycling kiosk

  1. The barcode is entered using a barcode scanner. [1]
  2. The lookup file is read because the program needs its existing material-code data for comparison. Opening it for writing could overwrite or alter the lookup data. [2]
  3. If no code matches, a suitable output is an on-screen error message such as Barcode not found. A sound or indicator light is also acceptable. [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