Computer Science (0478) · May/June 2016 · Mark scheme 22
Cambridge Computer Science (0478) mark scheme for paper 22, May/June 2016 — 0478/22/M/J/16, file 0478_s16_ms_22.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International General Certificate of Secondary Education
COMPUTER SCIENCE
0478/22
May/June 2016
Paper 2
MARK SCHEME
Maximum Mark: 50
Published
This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the
examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the
details of the discussions that took place at an Examiners’ meeting before marking began, which would have
considered the acceptability of alternative answers.
Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for
Teachers.
Cambridge will not enter into discussions about these mark schemes.
Cambridge is publishing the mark schemes for the May/June 2016 series for most Cambridge IGCSE®,
Cambridge International A and AS Level components and some Cambridge O Level components.
® IGCSE is the registered trademark of Cambridge International Examinations.
This syllabus is approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
This document consists of 6 printed pages.
© UCLES 2016
[Turn over
www.dynamicpapers.com
Page 2
Mark Scheme
Cambridge IGCSE – May/June 2016
Syllabus
0478
Paper
22
Section A
1
(a) (i) 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]
(ii) Any three from
–
–
–
–
TopWeight, 50.1
BottomWeight 49.9
TopWeightCement 25.1
BottomWeightCement 24.9
[3]
(b) 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
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
© Cambridge International Examinations 2016
[5]
www.dynamicpapers.com
Page 3
Mark Scheme
Cambridge IGCSE – May/June 2016
Syllabus
0478
Paper
22
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
(c) (i) 1 mark for value reason, all values and reasons must be different. There are many
possible correct answers these are examples only.
Data value
Reason – normal data sand should be accepted
Data value
Reason – boundary data sand should be rejected
49.95
50.1
[2]
(ii)
Data value
Reason – normal data cement should be accepted
25
Data value
26.7
Reason – abnormal data cement that should be rejected
[2]
(d) 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
© Cambridge International Examinations 2016
[5]
www.dynamicpapers.com
Page 4
Mark Scheme
Cambridge IGCSE – May/June 2016
Syllabus
0478
Paper
22
Section B
2
(i) 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]
(ii) 3 marks maximum, 1 mark for each improvement correctly included.
Sample answer below
1 Total = 0
2
FOR Counter = 1 To 10
3
REPEAT
4
INPUT Num
5
UNTIL Num >0
6
Total = Total + Num
7 NEXT Counter
8 PRINT Total
[3]
3
Area
0
13.5
34.5
46.5
65
(2 marks)
1 mark 0, 13.5
1 mark for rest
Tins
0
Height
3
3
3
3
–1
7
(1 mark)
Width
5
7
5
7
0
Doors
1
0
0
1
0
(1 mark)
Windows
0
0
3
1
0
[4]
© Cambridge International Examinations 2016
www.dynamicpapers.com
Page 5
4
Mark Scheme
Cambridge IGCSE – May/June 2016
Syllabus
0478
Paper
22
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
Assignment
FOR X ← 1 TO 10
Iteration
READ X
Input
PRINT X
Output
X ← Y + Z
[3]
5
6
7
– data structure (one—dimensional) array
– ……… reason to simplify programming/ make programs shorter, etc.
[2]
– IF (… THEN … ELSE … ENDIF)
– CASE (… OF … OTHERWISE … ENDCASE)
[2]
(a) – 7
[1]
(b) – Brochure Number
– ….. Uniquely identifies each record/each Brochure Number different/no duplicates
[2]
(c) – Number of Seats – number/integer
– Price in $ – currency/real
[2]
(d) 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
© Cambridge International Examinations 2016
[3]
www.dynamicpapers.com
Page 6
Mark Scheme
Cambridge IGCSE – May/June 2016
Syllabus
0478
Paper
22
(e)
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]
© Cambridge International Examinations 2016