Past-paper question · 2023 May-June · Paper 23 · Q11

Question 11 2023 · May-June · Paper 23 · 15 marks

Original past-paper question for 11
Original past-paper question for 11
Original past-paper question for 11
Original past-paper question for 11
Reveal official mark-scheme answer Official mark-scheme answer for 11

Official answer for Question 11

✓
Read the whole answer:

Question 15

✓
Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the
✓
programming language used (Python, VB.NET or Java).
✓
Mark SEEN on script if requirement met, cross if no attempt seen, NE if partially met (see marked scripts).
✓
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach.
✓
Then add up the total.
✓
Marks are available for:
✓
AO2 (maximum 9 marks)
✓
AO3 (maximum 6 marks)
✓
Data structures required:
✓
The names underlined must match those given in the scenario:
✓
Arrays or lists Contacts[]
✓
Variables
✓
CurrentSize, Cont, Choice, NewContacts, Count, Count2, Flag
✓
Requirements (techniques):
✓
R1 Output menu and input choice, with validation (range check, output with messages, input with prompts).
✓
R2 Input number of new entries, within limits, update current size of contacts, input new data and sort the array (range
✓
check, totalling, iteration and bubble sort).
✓
R3 Output array whole contents and delete contents of array (iteration, output with labelling/messages, array initialisation).
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s23_ms_23.pdf →

Show text version of question

Question 11

A
two-dimensional (2D) array Contacts[] is used to store names and telephone numbers. All

the data is stored as strings. The array must have the capacity to store 100 contacts in the form of:

  • column 1 – contact names as: last name, first name
  • for example: Smith, John

  • column 2 – telephone numbers.

The variable CurrentSize shows how many contacts are in the array.

Write a program that meets the following requirements:

  • display a menu of choices:
  • ○ enter new contact details ○ display all the contact details ○ delete all the contact details

  • validate the menu input
  • allow up to a maximum of five new contacts to be added to the array at any one time
  • do not allow more than 100 contacts in total
  • after new contacts have been added, sort the array by contact name, as long as there are at
  • least two contacts in the array

  • output the whole of the array
  • delete the contents of the array.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to declare any arrays, variables or constants; you may assume that this has already been done.

All inputs and outputs must contain suitable messages.

You do not need to initialise the data in the array Contacts[] and the variable CurrentSize

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 13

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 14

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................

[15]

Question 15

Question 16

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 Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_s23_qp_23.pdf

Keep practising this topic