Computer Science (0478) · Oct/Nov 2018 · PM 23
Cambridge Computer Science (0478) pm for paper 23, Oct/Nov 2018 — 0478/23/O/N/18, file 0478_w18_pm_23.pdf.
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
October/November 2018
PRE-RELEASE MATERIAL
* 6 2 9 7 5 8 4 9 7 9 *
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.
Any businesses described in this paper are entirely fictitious.
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 2 printed pages.
DC (CE) 150281/3
© UCLES 2018
[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 holiday park has a number of log cabins that it rents by the week as shown in the table:
Hetty
Name
Poppy
Blue Skies
Bay View
Happy Days
Summer Joy
Walkers’ Rest
Bertie
Green Forest Lodge
Coppice Lodge
Capacity
Peak
4
$400.00
4
$500.00
4
6
6
6
8
$250.00
$400.00
$250.00
$350.00
$650.00
$500.00
$695.00
$550.00
$800.00
$600.00
$950.00
8
$1050.00
10
$1500.00
10
Off-peak
$1200.00
$750.00
$850.00
$950.00
$1150.00
The capacity represents the maximum number of occupants for each log cabin. A program is needed
to record and store bookings. Log cabins can only be booked from weeks labelled on the calendar as
weeks 23 to 39, inclusive. Peak rates operate for weeks 27 to 35, inclusive, and off-peak rates apply
for weeks 23 to 26 and weeks 36 to 39, inclusive.
Write and test a program or programs.
•
Your program or programs must include appropriate prompts for the entry of data.
•
Error messages and other output need to be set out clearly and understandably.
•
All arrays, 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 – Setting up the bookings system.
Write a program, using arrays, to identify each log cabin, its capacity, cost and whether or not it has
been booked for each week. Identify each week by a number ranging from week 23 to 39.
TASK 2 – Taking a booking.
Extend the program to:
•
Identify and display which weeks are available for each log cabin, and its capacity.
•
Input the log cabin, number of weeks and start week for the booking.
•
Generate a unique booking code for the week(s) and log cabin chosen.
•
Store the unique booking code in your array
(multiple week bookings will need the booking code stored multiple times).
•
Calculate and output the cost of the booking.
TASK 3 – Applying a special offer.
Amend the program to apply a 10% discount to any booking of three weeks or more. Output the original
cost and the discounted cost of the booking.
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 2018
0478/23/PRE/O/N/18