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 | |
|---|---|---|
| 1The program must calculate the total cost of the items in the basket. | AThis describes how to code the solution, not what the program must do. It does not come from the problem or the user. | |
| 2The program should be good and easy to use. | BA weak requirement: it is vague and cannot be checked or tested. | |
| 3Requirements come from the problem and the user: the user says what they need the program to do. | CThe requirement is not specific. 'Fast' and 'nice' are vague and cannot be tested. | |
| 4Requirements are used later to test the program: each one can be checked against the finished program. | DA teacher says: 'I need the program to store each student's mark out of 100.' | |
| 5Requirement: The program must be fast and nice. | EA clear requirement: a specific statement of something the program must do. | |
| 6Requirement: The program will use a FOR loop and an array. | FRequirement: reject any age below 0 or above 120. Test: enter 150 and check it is rejected. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
requirement — A statement of something the program must do or provide so that the problem is solved. It is specific, comes from the problem and the user, and is used later to test the program.The program must ask the user for a name.// R1: Age must be 0 to 120
IF Age >= 0 AND Age <= 120 THEN// Test the program against each requirementR2: The program must OUTPUT the average.Requirements come from the problem
and from the user