Computer Science (0478) · Oct/Nov 2015 · PRE 22
Cambridge Computer Science (0478) pre for paper 22, Oct/Nov 2015 — 0478/22/O/N/15, file 0478_w15_pre_22.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge International Examinations
Cambridge International General Certificate of Secondary Education
* 8 5 4 6 3 2 7 2 0 9 *
0478/22
COMPUTER SCIENCE
Paper 2 Problem-solving and Programming
October/November 2015
PRE-RELEASE MATERIAL
No Additional Materials are required.
This material should be given to candidates on receipt by the Centre.
READ THESE INSTRUCTIONS FIRST
Candidates should use this material in preparation for the examination. Candidates should attempt the
practical programming tasks using their chosen high-level, procedural programming language.
This document consists of 2 printed pages.
DC (ST) 111424
© UCLES 2015
[Turn over
www.dynamicpapers.com
2
Candidates’ preparation for the examination should include attempting the following practical program
coding tasks.
Write and test a program to complete the three tasks.
A new born baby is kept in a cot in a hospital; the temperature of the baby is monitored every 10
minutes. The temperature of the baby is recorded in degrees Celsius to one decimal place and must be
within the range 36.0°C to 37.5°C.
TASK 1
To simulate the monitoring required, write a routine that allows entry of the baby’s temperature in
degrees Celsius. The routine should check whether the temperature is within the acceptable range, too
high or too low and output a suitable message in each case.
TASK 2
Write another routine that stores the temperatures taken over a three hour period in an array. This
routine should output the highest and lowest temperatures and calculate the difference between these
temperatures.
TASK 3
For a baby who has a temperature difference of more than one degree Celsius, and/or has been
outside the acceptable range more than twice in the three hour period, output a suitable message
giving a summary of the problem.
Your program must include appropriate prompts for the entry of data. Error messages and other outputs
need to be set out clearly and understandably. All variables, constants and other identifiers must have
meaningful names. Each task must be fully tested.
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable
effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will
be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
© UCLES 2015
0478/22/O/N/15