Question 1 Report
Fig. 1 shows a navigation display used by a sailing club. A crew member enters a boat identifier, and the program reads a file of safety checks before displaying the boat status. The displayed message must be easy to see in rain. If no file record exists, the program sends a warning to the instructor instead of showing a safe status.
(a) State the input device used to enter the boat identifier. [1]
(b) Explain why the program should test whether a matching record was found. [2]
(c) When no record is found, state one suitable output for the instructor. [1]
Table 1 shows records from a bakery ordering file. A program reads the file at 06:00, totals the number of each product required, then sends the totals to a kitchen display. New online orders are added while the program is running.
| OrderID | Product | Quantity |
|---|---|---|
| 801 | Rye loaf | 3 |
| 802 | Seeded roll | 12 |
| 803 | Rye loaf | 5 |
(a) When these three records are processed, calculate the total number of rye loaves displayed. [1]
(b) Explain why quantity should be validated as a positive integer. [2]
(c) State the file operation needed when a new online order is received. [1]
(d) Explain why the kitchen display is an output device. [1]
Sailing-club program
Bakery-order file
Everything you need to excel in your exams