Fig. 1 is a flowchart from a cinema booking program. It categorises a screen as large when it has more than 100 seats. Table 1 records data from a test run....

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

Question 1 Report

Fig. 1 is a flowchart from a cinema booking program. It categorises a screen as large when it has more than 100 seats. Table 1 records data from a test run. The developer used this example because 100 is a boundary number. One output in the table is not correct for the stated rule.

INPUT seatsseats ≥ 100?YesNoDISPLAY largeDISPLAY standard© EAGLE BEACON GLOBAL
Seats enteredProgram display
99standard
100large
101large

(a) Identify the erroneous comparison operator in Fig. 1. [1]
(b) Complete the expected displays for input values 100 and 101. [2]
(c) Write the corrected condition that should be used in the decision. [2]
(d) Give two values that are suitable boundary test data for this program. [2]

Answer Details

(a) The erroneous comparison operator is >=. [1] The stated rule is “more than 100 seats”, which excludes exactly 100.

(b) For 100 seats, the expected display is standard. [1] For 101 seats, the expected display is large. [1]

(c) The corrected condition is seats > 100. [2] The operator must be strictly greater than, and the boundary value is 100.

(d) Suitable boundary test data are 100 [1] and 101. [1] They test the highest standard value and the first large value.

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