Computer Science (0478) · Oct/Nov 2020 · PM 23

Cambridge Computer Science (0478) pm for paper 23, Oct/Nov 2020 — 0478/23/O/N/20, file 0478_w20_pm_23.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

Cambridge IGCSE™
COMPUTER SCIENCE

0478/23

Paper 2 Problem-solving and Programming

October/November 2020

PRE-RELEASE MATERIAL
* 1 5 1 3 9 9 7 0 5 9 *

No additional materials are needed.
This material should be given to the relevant teachers and candidates as soon as it has been
received at the centre.
INSTRUCTIONS
●
You should use this material in preparation for the examination.
●
You should attempt the practical programming tasks using your chosen high-level, procedural
programming language.

This document has 2 pages. Blank pages are indicated.
DC (ST) 185348/3
© UCLES 2020

[Turn over

www.dynamicpapers.com

2

Your preparation for the examination should include attempting the following practical tasks by writing
and testing a program or programs.
A baguette ordering service allows customers to order filled baguettes. There are two sizes of baguette:
30 cm and 15 cm. Baguettes are available as white, brown or seeded bread. Baguettes have one filling
and can have up to three salad items added.
Filling and salad choices are:
Filling

Salad

Beef
Chicken
Cheese
Egg
Tuna
Turkey

Lettuce
Tomato
Sweetcorn
Cucumber
Peppers

Customers choose their baguette options. They then confirm their order, alter their choices or choose
not to proceed.
Each day the ordering service calculates the number of each:
•
size of baguette sold
•
type of bread (white, brown or seeded) sold
•
filling sold.
Write and test a program or programs for the baguette ordering service.
•
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 – Ordering.
Customers are given choices on size, type of bread, filling and salad items as shown. Only valid
choices can be accepted. The customer is asked to confirm their order, alter their choices or choose
not to proceed. If the customer confirms their order they are given a unique order number. Display the
baguette ordered and the order number.
Task 2 – Recording the choices.
Extend TASK 1 to record totals for the size, types of bread and fillings sold that day and calculate the
total number of baguettes sold that day.
Task 3 – Finding the most and least popular baguette fillings.
Using your results from TASK 2, display the most popular and least popular fillings as a percentage of
the total number of baguettes sold that day.
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 2020

0478/23/PRE/O/N/20

Advertisement