0478 w17 Ms 22
0478 w17 Ms 22
0478 w17 Ms 22
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 International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes for the October/November 2017 series for most
Cambridge IGCSE®, Cambridge International A and AS Level components and some Cambridge O Level
components.
This syllabus is approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
1(a)(i) 1 mark for appropriate variable name, 1 mark for appropriate data type, 1 mark for appropriate use. 3
Many correct answers, they must be meaningful. These are examples only.
– HireTotal, integer, running total of money taken (for the day)
– HoursHired, real, running total of hours hired for the day
– Returned, real, hour and fraction of hour when next returned
1(a)(ii) 1 mark for appropriate constant name, 1 mark for appropriate value. 2
Many correct answers, they must be meaningful. These are examples only.
– HourPrice, 20.00
– HalfHourPrice 12.00
1(b) 1 mark for validation check, all checks must be different, 1 mark for the reason and 1 mark for the test data. 6
The only inputs for task 1 can be length of hire, money taken, time of hire and time of return.
There are many possible correct answers these are examples only.
Four from:
– Initialisation
– check HoursHired against MaxHoursHired «
« store the BoatNumber
« update MaxHoursHired if greater
– check if HoursHired = 0 …
… if so add 1 to NumberBoatsUnused
– update daily totals (for hours and money)
– output report with messages (including totals for hours and money, and number of boats unused and the most used
boat).
Max 4 marks
Example:
MaxHoursHired Å 0
TotalHoursHired Å 0
TotalMoney Å 0
NumberBoatsUnused Å 0
FOR BoatNumber Å 1 to 10
TotalMoney Å TotalMoney + Money(BoatNumber)
TotalHoursHired Å TotalHoursHired + HoursHired(BoatNumber)
IF HoursHired(BoatNumber) = 0
THEN NumberBoatsUnused Å NumberBoatsUnused + 1
ENDIF
IF HoursHired(BoatNumber) > MaxHoursHired
THEN
MostUsed Å BoatNumber
MaxHoursHired Å HoursHired(BoatNumber)
ENDIF
NEXT BoatNumber
PRINT "Boats were hired for ", TotalHoursHired, " hours"
PRINT "Total amount of money taken was ", TotalMoney
PRINT NumberBoatsUnused, " boats were not used"
Print "Boat number ", MostUsed, " was used most"
e.g.
Explanation (may include reference to program statements)
– check all boats for«
– « return time < current time // current booking slot available or return time > current time// current booking slot not
available
– keep a running total of those available
– display number of boats
Example:
FOR BoatNumber Å 1 to 10 loop to check for all boats
IF ReturnTime(BoatNumber) <= CurrentTime check return time against current time
THEN BoatsAvailable Å BoatsAvailable + 1 keep a running total
ENDIF
NEXT BoatNumber
PRINT "Number of boats available ", BoatsAvailable display number of boats
2 1 mark for each, there may be other solutions, award full marks for any working solution 6
Sample algorithm:
INPUT NumberCount
Total Å 0
FOR Count Å 1 TO NumberCount
INPUT Number
Total Å Total + Number
NEXT
Average Å Total/NumberCount
PRINT Total, Average
Identification:
CASE …
… OF … OTHERWISE … (ENDCASE)or
… OF … (OTHERWISE) … ENDCASE
Description:
– a statement that allows for multiple selections // not any of the above
Reason:
– to simplify pseudocode/ make pseudocode more understandable etc.
0 0 0
1 1 50.4
2 2 50.3
1 3 49.1
3 4 50.3
4 5 50.0
5 6 49.5
6 7 50.2
7 8 50.3
8 9 50.5
2 10 50.6 82
6(a) – 1 mark for each field suitable name, 1 mark for appropriate data type and appropriate data sample 6
The following are examples there are many different correct answers.