Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
Count the arrows in the diagram. S1 to S2, S2 to S3 and S1 to S3 change state; the loop on S2 does not. The two arrows with | Activate pump and | Deactivate pump have outputs. The arrow into S1 from the dot is the start arrow. The double circle is the end state.
| Answer | |
|---|---|
| The number of transitions that result in a different state | 3 |
| The number of transitions with associated outputs | 2 |
| The label that should replace 'X' | Start |
| The final or halting state | S3 |
Different state: 3 [1]
Transitions with outputs: 2 [1]
Label for X: Start [1]
Final state: S3 [1]
From S1, the first Low level detected goes to S2 and activates the pump (one output). The next three Low level detected inputs loop on S2 and give no output.
Number of outputs: 1 [1]
Current state: S2 [1]
Write three items that belong to one loan, such as User ID (or username), Book ID and date of loan (or return date).
At least one correct item [1]
All three correct items [1]
Write data the system needs but that is not part of each loan, for example:
The user's name (or address or phone number), or the book title (or author, ISBN, publisher, rack number). Any one of these. [1]
Write two other things the system does to the loan data, any two of:
Create a loan (borrow a book) [1]
Return a book (or send an email or letter to a user about an overdue book, or view the loan history of a book or user) [1]
▶ Whole paper
Video solution of the whole paper · by Papersdock. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.