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]
There are two possible entry routes, valid ticket plus checked bag, or staff pass. Lockdown is a final safety restriction applied to both routes.
((ticketValid AND bagChecked) OR staffPass) AND NOT lockdown. [4]bagChecked is false, and there is no staff pass. The output is false. [1]NOT lockdown is false and the output is false. [1]NOT lockdown to the whole rule prevents every entry route during lockdown, including ticket holders and staff-pass holders. [2]Everything you need to excel in your exams