Computer Science (2210) · May/June 2020 · PM 21

Cambridge Computer Science (2210) pm for paper 21, May/June 2020 — 2210/21/M/J/20, file 2210_s20_pm_21.pdf.

Advertisement
Loading the paper…

More Computer Science (2210) papers

Other papers · May/June 2020

Paper 21 in other years

All Computer Science papers
Text of this paper

Cambridge O Level
COMPUTER SCIENCE

2210/21

Paper 2 Problem-solving and Programming

May/June 2020

PRE-RELEASE MATERIAL
* 1 3 3 0 0 8 8 4 0 2 *

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 (RW) 198771
© UCLES 2020

[Turn over

2
Your preparation for the examination should include attempting the following practical tasks by writing
and testing a program or programs.
A shop sells a range of mobile devices, SIM cards and accessories as shown in the table:
Category
Phone
Phone
Phone
Phone
Phone
Phone
Tablet
Tablet
Tablet
Tablet
SIM card
SIM card
Case
Case
Charger
Charger

Item code
BPCM
BPSH
RPSS
RPLL
YPLS
YPLL
RTMS
RTLM
YTLM
YTLL
SMNO
SMPG
CSST
CSLX
CGCR
CGHM

Description
Compact
Clam Shell
RoboPhone – 5-inch screen and 64 GB memory
RoboPhone – 6-inch screen and 256 GB memory
Y-Phone Standard – 6-inch screen and 64 GB memory
Y-Phone Deluxe – 6-inch screen and 256 GB memory
RoboTab – 8-inch screen and 64 GB memory
RoboTab – 10-inch screen and 128 GB memory
Y-Tab Standard – 10-inch screen and 128 GB memory
Y-Tab Deluxe – 10-inch screen and 256 GB memory
SIM Free (no SIM card purchased)
Pay As You Go (SIM card purchased)
Standard
Luxury
Car
Home

Price ($)
29.99
49.99
199.99
499.99
549.99
649.99
149.99
299.99
499.99
599.99
0.00
9.99
0.00
50.00
19.99
15.99

Write and test a program or programs for this shop.
•
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 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 system.
Write a program to:
•
use appropriate data structures to store the item code, description and price information for the
mobile devices, SIM cards and accessories
•
allow the customer to choose a specific phone or tablet
•
allow phone customers to choose whether the phone will be SIM Free or Pay As You Go
•
allow the customer to choose a standard or luxury case
•
allow the customer to choose the chargers required (none, one or both may be purchased)
•
calculate the total price of this transaction
•
output a list of the items purchased and the total price.
Task 2 – Allow a customer to order multiple mobile devices.
Extend Task 1 to:
•
offer the customer the opportunity to purchase an additional mobile device
•
if required, perform bulleted steps 2 to 7 of Task 1 for each additional mobile device and calculate
a running total for the customer
•
once no further devices are required, output the total the customer will need to pay.
Task 3 – Offering discounts.
Extend the program to allow a discount of 10% off the price of every additional phone or tablet
purchased.
Output the new total the customer will need to pay and the amount of money saved.
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

2210/21/PRE/M/J/20

Advertisement