Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Inputs: username, password Process: compare with stored details Output: Access granted / denied Storage: user file | AThe design was not checked against the original requirements, so errors such as a wrong limit or a missing alarm output may go unnoticed. | |
| 2IF Temp > 30 THEN OUTPUT "ALARM" ENDIF | BLogin system -> Get details, Check details, Show result | |
| 3Draw a structure diagram: the top box is the whole system and the lower boxes are its sub-systems | CPseudocode for the decision part of a temperature alarm sub-system | |
| 4Write pseudocode for one sub-problem as a procedure, which the main program calls | DThe scenario was not decomposed into inputs, processes, outputs and storage, so the design cannot be fully checked. | |
| 5Login system: Get details, Check details, Show result (no inputs, outputs or storage listed) | EPROCEDURE CheckTemp IF Temp > 30 THEN OUTPUT "ALARM" ENDIF ENDPROCEDURE | |
| 6Temperature alarm pseudocode written, but never compared with the requirement 'sound alarm if above 30' | FDecomposing a simple login system into inputs, processes, outputs and storage |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
abstract, decompose, draw, write — Abstract the scenario, split it into inputs, processes, outputs and storage, draw a structure diagram, then write a flowchart or pseudocode for each part and check it against the requirements.OUTPUT "Enter password"
INPUT PasswordThreshold ← 40
INPUT TempCALL GetLogin
CALL CheckLogin
CALL ShowResultFUNCTION CheckPassword(Pw) RETURNS BOOLEAN
RETURN Pw = StoredPassword
ENDFUNCTIONIF Temp > 40 THEN
OUTPUT "Alarm on"
ENDIF