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

Cambridge Computer Science (0478) pre for paper 23, May/June 2017 — 0478/23/M/J/17, file 0478_s17_pre_23.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge International Examinations
Cambridge International General Certificate of Secondary Education

0478/23

COMPUTER SCIENCE
Paper 2 Problem-solving and Programming

May/June 2017

PRE-RELEASE MATERIAL
* 9 4 2 4 5 3 8 4 0 7 *

No Additional Materials are required.
This material should be given to the relevant teachers and candidates as soon as it has been received
at 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.

The syllabus is approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.

This document consists of 2 printed pages.
DC (ST) 143270
© UCLES 2017

[Turn over

2

www.dynamicpapers.com

In preparation for the examination candidates should attempt the following practical tasks by writing
and testing a program or programs.
A teacher is planning a school trip to a theme park at the end of term. You have been asked to write a
program to work out the cost per student, to record those who are going and whether they have paid.
The maximum number of students who can go on the trip is 45.
Write and test a program for the teacher.

•
•
•

Your program must include appropriate prompts for the entry of data.
Error messages and other output need to be set out clearly.
All variables, constants and other identifiers must have meaningful names.

You will need to complete these three tasks. Each task must be fully tested.
TASK 1 – Work out the cost.
The cost of the trip for each student is a share of the cost of a coach plus the cost of entry to the theme
park. The total cost of the coach will be $550. The entry cost to the park is $30 for each student. The
theme park gives one free ticket for every ten that are bought, which must be taken into consideration.
Set up a program that:

•
•
•
•

stores the cost of the coach
stores the cost of an entry ticket
inputs the estimated number of students taking part, this must be validated on entry and an
unsuitable entry rejected
calculates and outputs the recommended cost per student to ensure the trip does not make a loss.

TASK 2 – Record the students who are going and whether they have paid.
Input and store the names of the students who have asked to go on the trip up to the maximum number
allowed. Input and store whether each student has paid. Enable printouts to be produced to show
students who have not paid and those who have paid.
TASK 3 – Work out final costs.
Not all students will end up going on the trip, for example they might not have paid. Modify the program
so that it gives overall totals for the costs charged and the amount of money collected. Output whether
the school trip has made a profit or loss, or has broken even, and the amount of the final balance.

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 2017

0478/23/PRE/M/J/17

Advertisement