An algorithm is designed to calculate the booking fee for a hot-desk at a co-working space as shown below:
10 SEND "Welcome to Co-Work Space" TO DISPLAY
11 SEND "How many days do you wish to book?" TO DISPLAY
12 RECEIVE days FROM (INTEGER) KEYBOARD
13 SEND "Cost based on " & days & " days" TO DISPLAY
14
15 IF (days > 12) THEN
16 SET cost TO 180 + (10 * (days - 12))
17 ELSE
18 IF (days > 8) THEN
19 SET cost TO 180
20 ELSE
21 IF (days > 3) THEN
22 SET cost TO 120
23 ELSE
24 SET cost TO 50
25 END IF
26 END IF
27 END IF
28
29 SEND "Total booking cost: " & cost TO DISPLAY
The algorithm needs to be tested more thoroughly.
Complete the table below to give suitable input test data to meet each requirement.
| Requirement | Input Test Data |
|---|---|
| Output cost = 120 | |
| An output that is not correct (logical error) |