Question 3
Edexcel Computer Science June 2020 Paper 2GCSE6 marks
On the specification
- (a)
- 3.1 Hardware
- (b)
- 6.5 Operators
- (c)
- 6.2 Program constructs
- (d)
- 1.3 Truth tables
Question text
3 The airport has touchless handwashing stations. The stations automatically dispense soap, water and warm air for drying. To conserve water, the stations must ensure that only one operation is carried out at a time. Here is the algorithm for controlling the handwashing stations. (a) State the name of the input device in the algorithm used to control the water dispenser. (1) (b) State one condition allowed by the algorithm that does not meet the requirements for the hand washing stations. (1) (c) The algorithm does not make efficient use of the selection programming construct. Write replacement code to control the soap dispenser that would improve the efficiency of the algorithm. (2) (d) When a handwashing station is not in use, the variables soapStatus (S), waterStatus (W) and dryerStatus (D) are all set to false and a message ‘Everything is off’ is displayed. Construct a Boolean logic statement using S, W and D to represent the conditions necessary for the system to display ‘Everything is off’. (2) (Total for Question 3 = 6 marks)