The railway maintenance program decides whether a track section can be reopened after overnight work. The section is available if an engineer has signed it ...

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

Question 1 Report

The railway maintenance program decides whether a track section can be reopened after overnight work. The section is available if an engineer has signed it off and either the automated sensor test passes or a manual inspection passes. The program stores the three results as Boolean variables. A supervisor wants to use the statement open = signedOff AND (sensorPass OR manualPass). This prevents an unsigned section opening merely because a test result is positive. Consider a section that is signed off, fails the sensor test, but passes manual inspection.

(a) Explain why the OR operation is inside brackets. [2]
(b) When the three values are True, False and True in the order given, state the value of open. [1]
(c) When signedOff is False and both test variables are True, state the value of open. [1]
(d) Explain why the sign-off check is important in this program. [1]

Answer Details

The rule is open = signedOff AND (sensorPass OR manualPass).

  1. (a) Either test may provide a pass, so sensorPass OR manualPass is grouped together. [1] The resulting test decision is then combined with signedOff using AND. [1]
  2. (b) For signed off True, sensor pass False, manual pass True: False OR True is True, then True AND True is True. The section can open. [1]
  3. (c) If signedOff is False, then even if both tests pass, False AND True is False. [1]
  4. (d) The sign-off check ensures that an authorised engineer has approved reopening. [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