A wildlife charity uses a program to record sea turtle nest inspections. Fig. 1 shows its first decomposition. Rangers enter a nest code, count eggs and rec...

Assessment: Computer Science 4CP0 | Paper 2 Mock 01 | Written Paper 2 Subject: Computer Science - 4CP0

Question 1 Report

A wildlife charity uses a program to record sea turtle nest inspections. Fig. 1 shows its first decomposition. Rangers enter a nest code, count eggs and record whether tracks are visible. The charity wants reliable data, but the final display should show a simple warning only when an inspection needs attention.

Inspect nestEnter nest dataAssess inspectionSave and displayCheck egg countCheck tracks© EAGLE BEACON GLOBAL

(a) Identify the module that should write the inspection record to a file. [2]
(b) Give two validation checks that can be applied to the egg-count input. [2]
(c) Complete the abstraction by stating two data items that the warning display needs if the egg count is below 20. [2]
(d) Write pseudocode for a selection statement that displays the word CHECK when eggCount is below 20. [4]

Answer Details

(a) The module is Save and display, because it includes the responsibility for saving the completed inspection record, that is, updating the file. [2]

(b) Two appropriate validation checks are that the egg count is an integer and that it is greater than or equal to 0. A sensible maximum range check or rejecting blank input would also be valid. [2]

(c) The warning display needs the nest code, so rangers know which nest needs attention, and the egg count or warning status, to show why the warning was produced. [2]

(d) A valid selection statement is:

IF eggCount < 20 THEN
  DISPLAY "CHECK"
ENDIF

The comparison is strict because exactly 20 is not below 20. [4]

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