Computer Science (0478) · May/June 2015 · PRE 23

Cambridge Computer Science (0478) pre for paper 23, May/June 2015 — 0478/23/M/J/15, file 0478_s15_pre_23.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International General Certificate of Secondary Education

* 4 7 1 2 1 8 3 7 0 3 *

0478/23

COMPUTER SCIENCE
Paper 2 Problem-solving and Programming

May/June 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 (RW) 106673
© 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.
TASK 1
A data logger records the temperature on the roof of a school twice a day, at midday and midnight.
Input and store the temperatures recorded for a month. You must store the temperatures in two onedimensional arrays, one for the midday temperatures and one for the midnight temperatures. All the
temperatures must be validated on entry and any invalid temperatures rejected. You must decide your
own validation rules. You may assume that there are 30 days in a month.

TASK 2
Calculate the average temperature for midday and the average temperature for midnight. Output these
averages with a suitable message for each one.

TASK 3
Select the day with the highest midday temperature and the day with the lowest midnight temperature.
Then output each of these temperatures, the corresponding day and a suitable message.
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/23/M/J/15

Advertisement