Software development and testing – A Level Computer Science (9618)
31 questions · page 3 of 3 · Clear filters
Question text
2
(a) Examine the following state-transition diagram.
Low level detected | Activate pump
Low level detected
X
S2
S1
Normal level detected | Deactivate pump
Normal level detected
S3
(i)
Complete the table with reference to the diagram.
Answer
The number of transitions that result in a different state
The number of transitions with associated outputs
The label that should replace ‘X’
The final or halting state
[4]
(ii)
The current state is S1. The following inputs occur.
1.
Low level detected
2.
Low level detected
3.
Low level detected
4.
Low level detected
Give the number of outputs and the current state.
Number of outputs …
Current state …
[2]
(b) A system is being developed to help manage book loans in a library.
Registered users may borrow books from the library for a period of time.
(i)
State three items of data that must be stored for each loan.
1 …
2 …
3 …
[2]
(ii)
State one item of data that will be required in the library system but does not need to be
stored for each loan.
… [1]
(iii)
One operation that manipulates the data stored for each loan, would produce a list of all
overdue books.
Identify two other operations.
Operation 1 …
…
Operation 2 …
…
[2]