Computer Science (0478) · May/June 2019 · PM 23
Cambridge Computer Science (0478) pm for paper 23, May/June 2019 — 0478/23/M/J/19, file 0478_s19_pm_23.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge Assessment International Education
Cambridge International General Certificate of Secondary Education
0478/23
COMPUTER SCIENCE
Paper 2 Problem-solving and Programming
May/June 2019
PRE-RELEASE MATERIAL
* 7 5 7 7 7 4 3 3 7 5 *
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 regulated 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) 162393/3
© UCLES 2019
[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 discount stationery store sells items in bulk at a discount to its customers. Customers can order from
a small range of items available on that day. The greater the quantity of an item they buy in one order,
the greater the discount for that item.
Quantity of an item
Discount
10
5%
20
10%
50
25%
100
35%
500
50%
In addition to this, new customers can use a $10 voucher, provided their order comes to more than
$50. Also, returning customers are given a discount voucher with a monetary value.
Write and test a program or programs for the discount stationery store.
•
•
•
Your program or programs must include appropriate prompts for the entry of data; data must be
validated on entry.
Error messages and other output need to be set out clearly and understandably.
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 – Stationery available on the day.
Using arrays, set up a list of at least 10 different items available that day. For every item include: item
code, description, price and the amount in stock. All item codes must be different. Display the item
code, description, price and the amount in stock on the screen.
Task 2 – Customer places an order.
The customer chooses an item code from the list of currently available items. Any items that are out of
stock are not displayed and any items that have low stock of 10 or fewer are highlighted. The customer
enters the number they wish to purchase. If there are not enough items in stock the number is rejected.
The price to pay and any discount is shown on the screen. When the order is complete, any customer
discount voucher is applied and the total price is shown. If the customer confirms the order, the stock
numbers are then updated.
Task 3 – At the end of the day.
List the item codes of any items that have sold out. Display the item code of any items of which none
have been sold. Display the item code and description of the item of which the greatest quantity have
been sold today.
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
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.
© UCLES 2019
0478/23/PRE/M/J/19