Computer Science (0478) · May/June 2021 · PM 23
Cambridge Computer Science (0478) pm for paper 23, May/June 2021 — 0478/23/M/J/21, file 0478_s21_pm_23.pdf.
Text of this paper
www.dynamicpapers.com
Cambridge IGCSE™
COMPUTER SCIENCE
0478/23
Paper 2 Problem-solving and Programming
May/June 2021
PRE-RELEASE MATERIAL
* 1 7 6 1 3 4 5 0 0 7 *
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.
DC (KN) 202760/2
© UCLES 2021
[Turn over
2
www.dynamicpapers.com
Your preparation for the examination should include attempting the following practical tasks by writing
and testing a program or programs.
A school would like a system to allow students and staff to show their preference on matters relating to
the school, such as a proposal for changing the start and finish times of the school day.
Option
A
B
C
D
E
Proposed start and finish times of the school day
Start: 08:00 – Finish: 15:00
Start: 08:20 – Finish: 15:20
Start: 08:40 – Finish: 15:40
Start: 09:00 – Finish: 16:00
Start: 09:30 – Finish: 16:30
The school has 150 students and 20 members of staff. The system is required to accept preferences,
and count and report the results to show student preferences, staff preferences and overall results.
Write and test a program or programs for the system.
•
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 – Setting up the system and recording preferences.
Set up a system to allow preferences to be recorded for each of five different options, labelled A to E.
•
Allow a description for each option to be entered.
•
Allow students and staff to enter their unique number before their preferences can be entered
(everyone is given a unique number by the school).
•
Check if the unique number has already been used:
○ if so, supply a suitable message and do not allow preferences to be entered
○ if not:
•
record that the entered unique number has been used
•
allow preferences from 1 to 5 to be entered for each option (1 is ‘strongly agree’ and
5 is ‘strongly disagree’)
•
store the preferences in suitable data structures, keeping student and staff preferences
separate.
Task 2 – Totalling the preferences and reporting the results.
Extend Task 1 to achieve the following:
•
Allow the preferences for each of the options to be totalled, keeping student and staff preferences
separate.
•
Display the results as a list of the options, with the totals given for each one as:
○ student results
○ staff results
○ combined results.
Task 3 – Changing the program to include a counting method.
Extend Task 2 to achieve the following:
•
Count the number of times the preference 1, ‘strongly agree’, was given for each option, counting
student and staff preferences separately.
•
Display the results as a list of the options, with the number of times preference 1 was given for
each option as:
○ student results
○ staff results
○ combined results.
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 2021
0478/23/PRE/M/J/21