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.
| Seats entered | Program display |
|---|---|
| 99 | standard |
| 100 | large |
| 101 | large |
(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]
(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.
Everything you need to excel in your exams