A program controls the heating system in a sports hall. Part of the program involves reading a value from a sensor. The sensor produces a numeric value that represents the temperature. The value is an integer, which should be in the range 0 to 40 inclusive. A program function has been written to validate the values from the sensor.
- (a)A test plan is needed to test the function. Complete the table. The first line has been completed for you. You can assume that the sensor will generate only integer data values. Test Test data value Explanation Expected outcome 1 23 Normal data Data is accepted 2 3 4 5[4]
- (b)A program module controls the heaters. This module operates as follows: • If the temperature is below 10, switch the heaters on. • If the temperature is above 20, switch the heaters off. Complete the following state-transition diagram for the heating system: Start Heaters Off Heaters On[3]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2021). The mark or mark type is shown in brackets.
- [4] Test | Test data value | Explanation | Expected Outcome
- 1 | 23 | Normal Data | Data is accepted
- 2 | 0 | Boundary Data | Data is accepted
- 3 | 40 | Boundary Data | Data is accepted
- 4 | >= 41 | Abnormal Data | Data is rejected
- 5 | <= -1 | Abnormal Data | Data is rejected
- One mark per row for rows 2 to 5.
- [3] One mark for each label:
- • Temp < 10 (Heaters Off to Heaters On)
- • Temp > 20 (Heaters On to Heaters Off)
- • on BOTH loops (non-contradictory values)
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →