The concert-entry algorithm checks three Boolean values stored after a QR scan: ticketValid, bagChecked and staffPass. A visitor enters if the ticket is val...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

Question 1 Report

The concert-entry algorithm checks three Boolean values stored after a QR scan: ticketValid, bagChecked and staffPass. A visitor enters if the ticket is valid and the bag has been checked. A staff-pass holder enters without those two checks, unless the venue is locked down. The variable lockdown is true during an emergency.

(a) Give the Boolean expression for allowEntry. [4]
(b) State the output when ticketValid is true, bagChecked is false, staffPass is false and lockdown is false. [1]
(c) State the output when ticketValid is false, bagChecked is false, staffPass is true and lockdown is false. [1]
(d) State the output when ticketValid is true, bagChecked is true, staffPass is true and lockdown is true. [1]
(e) Give one security reason for applying NOT lockdown to the whole entry rule. [2]

Answer Details

There are two possible entry routes, valid ticket plus checked bag, or staff pass. Lockdown is a final safety restriction applied to both routes.

  1. (a) ((ticketValid AND bagChecked) OR staffPass) AND NOT lockdown. [4]
  2. (b) A valid ticket alone is insufficient because bagChecked is false, and there is no staff pass. The output is false. [1]
  3. (c) A staff pass makes the inner OR expression true; lockdown is false. The output is true. [1]
  4. (d) Lockdown is true, so NOT lockdown is false and the output is false. [1]
  5. (e) Applying NOT lockdown to the whole rule prevents every entry route during lockdown, including ticket holders and staff-pass holders. [2]

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