Computer Science Paper 22
May / June 2016·2210·7 questions
Mock exam: 105 min, official timing
Question paper
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Mark scheme
Question 1
1(a)(i)[3]
Many correct answers, they must be meaningful. This is an example only. – NumSacks, integer, number of sacks – SacksAccepted, integer, number of sacks accepted – TotalWeight, real, total weight of all sacks [3]
1(a)(ii)[3]
Any three from – TopWeight, 50.1 – BottomWeight 49.9 – TopWeightCement 25.1 – BottomWeightCement 24.9 [3]
1(b)[5]
Any five from:
– initialise total weight of order – input number of sacks for each type outside loop(s) – loop for order completion – input weight inside loop(s) – add weight of accepted sack to total weight – output total weight outside all loop(s) – appropriate prompts for input number of sacks for each type and input weight [5]
Max 5 marks Sample Answer 1 INPUT 'Number of sand sacks ordered ' num_sand_ordered INPUT 'Number of cement sacks ordered ' num_cement_ordered INPUT 'Number of gravel sacks ordered ' num_gravel_ordered total_weight ← 0 FOR Counter ← 1 TO num_sand_ordered INPUT 'weight of sack of sand ' sack_weight total_weight ← total_weight + sack_weight NEXT Counter FOR Counter ← 1 TO num_cement_ordered INPUT 'weight of sack of cement ' sack_weight total_weight ← total_weight + sack_weight NEXT Counter FOR Counter ← 1 TO num_gravel_ordered INPUT 'weight of sack of gravel' sack_weight total_weight ← total_weight + sack_weight NEXT Counter Print 'Total weight of sacks is ' total_weight Sample Answer 2 INPUT 'Number of sand sacks ordered ' num_sand_ordered INPUT 'Number of cement sacks ordered ' num_cement_ordered INPUT 'Number of gravel sacks ordered ' num_gravel_ordered total_sacks_ordered ← num_sand_ordered + num_cement_ordered + num_gravel_ordered total_weight ← 0 FOR Counter ← 1 TO total_sacks_ordered INPUT 'weight of sack ' sack_weight total_weight ← total_weight + sack_weight NEXT Counter Print 'Total weight of sacks is ' total_weight
1(c)(i)[2]
1 mark for value reason, all values and reasons must be different. There are many possible correct answers these are examples only. Data value 49.95 Reason – normal data sand should be accepted Data value 50.1 Reason – boundary data sand should be rejected [2]
1(c)(ii)[2]
Data value 25 Reason – normal data cement should be accepted Data value 26.7 Reason – abnormal data cement that should be rejected [2]
1(d)[5]
Maximum 5 marks in total, maximum 3 marks if only programming statements used Description (may include reference to program statements) – use of prices for calculation of regular price either numbers, variables or constants (sand and gravel 2, cement 3) – description of calculation of regular price, multiply no of sand sacks by 2, multiply no of gravel sacks by 2, multiply no of cement sacks by 3 – output of regular price – description of calculating the number of special packs using the pack information (2 sacks of sand, 2 sacks of gravel and 1 sack of cement) – …….repeat until there are no more packs in the order (less than 2 sacks of sand or less than 2 sacks of gravel or no sacks of cement – calculation of discount price and/or amount saved – output discount price and/or amount saved [5]
Question 2
2(i)[6]
1 mark for each improvement use FOR … NEXT instead of REPEAT … UNTIL Move PRINT to after the end of the loop Add error checking to check that the value input is positive [3]
Question 3
Area Tins Height Width Doors Windows 0 0 5 1 0 13.5 7 0 0 34.5 5 0 46.5 7 1 1 65 –1 0 0 0 7 (2 marks) 1 mark 0, 13.5 1 mark for rest ✓(1 mark) ✓ (1 mark) [4]
Question 4
1 mark for each correct line, maximum 3 (zero correct 0, one correct 1, two correct 2, three or four correct 3), each box must have only one connection. Statement type example [3]
Question 5
– data structure (one—dimensional) array ………. – ……… reason to simplify programming/ make programs shorter, etc. [2]
Question 6
– IF (… THEN … ELSE … ENDIF) – CASE (… OF … OTHERWISE … ENDCASE) [2]
Question 7
7(a)[1]
– 7 [1]
7(b)[2]
– Brochure Number…….. – ….. Uniquely identifies each record/each Brochure Number different/no duplicates [2]
7(c)[2]
– Number of Seats – number/integer – Price in $ – currency/real [2]
7(d)[3]
1 mark for each correct result, 1 mark for the results in descending order of price – Recliner sofa 1,200 RS23 – Recliner chair 600 RC01 [3]
Assignment Iteration Input Output FOR X ← 1 TO 10 READ X PRINT X X ← Y + Z
7(e)[5]
Field: Brochure Number Material Colour Price in $ Number of Seats Table: SOFASELECT SOFASELECT SOFASELECT SOFASELECT SOFASELECT Sort: Show: Criteria: >2 or: (1 mark) (1 mark) (1 mark) (1 mark) (1 mark) [5]

