Cambridge International General Certificate of Secondary Education
Cambridge International General Certificate of Secondary Education
Cambridge International General Certificate of Secondary Education
Write your centre number, candidate number and name in the spaces at the top of this page.
Write in dark blue or black pen.
You may use an HB pencil for any diagrams, graphs or rough working.
Do not use staples, paper clips, glue or correction fluid.
DO NOT WRITE IN ANY BARCODES.
DO NOT ATTEMPT TASKS 1, 2 AND 3 in the pre-release material; these are for information only.
You are advised to spend no more than 40 minutes on Section A (Question 1).
No marks will be awarded for using brand names of software packages or hardware.
At the end of the examination, fasten all your work securely together.
The number of marks is given in brackets [ ] at the end of each question or part question.
This syllabus is regulated for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
DC (ST/ST) 162394/4
© UCLES 2019 [Turn over
2
Section A
You are advised to spend no longer than 40 minutes answering this section.
Use the pre-release material and your experience from attempting the tasks before the examination to
answer Question 1.
Pre-release Material
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.
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.
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.
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.
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.
© UCLES 2019 0478/23/M/J/19
3
1 (a) All variables, constants and other identifiers must have meaningful names.
Describe the data structures you have used in Task 1 to record the items available that day.
Include some sample data for each data structure you have described.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [5]
(b) Explain how your program for Task 1 ensures all the item codes are different.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(c) Explain how your program for Task 2 highlights items where the stock level is low.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
(d) Write an algorithm for Task 2 using either pseudocode, programming statements or a
flowchart. Assume that Task 1 has been completed and the list of items currently available
has already been displayed.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [5]
© UCLES 2019 0478/23/M/J/19 [Turn over
6
(e) Explain how your program completes Task 3. Any programming statements used in your
answer must be fully explained.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [5]
© UCLES 2019 0478/23/M/J/19
7
Section B
2 (a) An algorithm has been written in pseudocode to input the weight of 500 items and reject any
that are over-weight or under-weight, then print the percentage rejected.
Count 1
Reject 0
Over 62
Under 58
REPEAT
INPUT ItemWeight
IF ItemWeight > Over AND ItemWeight < Under
THEN
Reject Reject - 1
ENDIF
Count Count + 1
UNTIL Count > = 500
Reject Reject / 100
PRINT "Percentage rejected is ", Reject
Find the four errors in the pseudocode and suggest a correction for each error.
Error 1 .......................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 2 .......................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 3 .......................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 4 .......................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
[4]
(b) Describe how you would change the corrected algorithm to calculate the number accepted
instead of rejected, using a variable Accept, and print a warning if fewer than 50% are
accepted.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
3 This flowchart inputs the tread depth of five tyres, four on the car and a spare tyre. Any tread
depth of 1.6 mm or less is rejected. To be potentially roadworthy, a car must have four tyres with a
tread depth greater than 1.6 mm.
START
TreadReject 0
Count 1
Is Yes
Count = 6?
Count Count + 1 No
Is No
INPUT Depth TreadReject
<= 1?
No Is
Depth <=
1.6?
Yes
TreadReject TreadReject + 1
OUTPUT "Car is
potentially
roadworthy"
END
Trace table 1
Trace table 2
[4]
4 For each of the four checks in the table, place a tick in the correct column to show whether it is an
example of a validation or verification check.
5 Identify and describe three loop structures that are available in pseudocode.
..........................................................................................................................................................
Description .......................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Description .......................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Description .......................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
[6]
6 A database table, TRAIN, is used to keep a record of train departures from a station.
(a) Explain why the field Train Number could not be used as a primary key.
...................................................................................................................................................
............................................................................................................................................. [1]
(b) A query-by-example has been written to display only the train numbers and platforms of all
trains leaving after 08:30 that are late.
Explanation ...............................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Field:
Table:
Sort:
Show:
Criteria:
or:
[7]
BLANK PAGE
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.