Question 1(a) 2021 · May-June · Paper 41 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 1
Part (a)
Question 1
mark for each completed space - accept any equivalent statements
Question 5
Show text version of question
Question 1
Part (a)
Question 1
A vending machine allows users to insert coins to purchase an item.
The user then enters the code for the item they would like the machine to dispense (give out). The user must re-enter the code until it is valid.
If the code is valid but the user has not inserted enough money for the item chosen, the machine waits for more coins to be inserted. The user then has to re-enter the code.
The user can press cancel at any time to return the money inserted into the machine.
Part (a)
The state-transition diagram shows the different states of the vending machine.
Complete the state-transition diagram.
..........................
Total the money Cancel inserted
Return .............................. money
......................
Check Cancel code valid
Code re-entered Valid code
Check ................. ............. Sufficient money total inserted ................. .............
Question 3
Why this question appears here
71% assigned-topic match · Programming › Constructs
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s21_qp_41.pdf
