Past-paper question · 2023 October-November · Paper 23 · Q8(d)

Question 8(d) 2023 · October-November · Paper 23 · 12 marks

Original past-paper question for 8(D)
Original past-paper question for 8(D)
Original past-paper question for 8(D)
Original past-paper question for 8(D)
Original past-paper question for 8(D)
Reveal official mark-scheme answer Official mark-scheme answer for 8(D)

Official answer for Question 8

Part (d)

✓
Note: Max 3 marks (from either limitation or modification list)

Question 3

✓
Limitation:
✓
1 GetData() does not return a value until a message has been received
✓
2 So once a message has been sent the user has to wait for a reply // chat
✓
is half-duplex
✓
Modification:
✓
3 If no response allow the receiver to exit chat at any time …
✓
4 GetData() should immediately return a suitable message // set a time
✓
limit
✓
5 ... which Chat() can detect and respond by allowing the conversation to
✓
continue

Mark scheme 9618_w23_ms_23.pdf →

Show text version of question

Question 8

Part (d)

Question 8

[3]

Question 7

Part (b)

A module AddTo() will add a value to the queue by manipulating the array and variables in

part (a).

The queue implementation is circular. When pointers reach the end of the queue, they will ‘wrap around’ to the beginning.

Before a value can be added to the queue, it is necessary to check the queue is not full.

The algorithm to add a value to the queue is expressed in six steps.

Complete the steps.

1. If NumItems .............................. then jump to step 6.

2. Increment ................................... .

3. If ................................................. then set EndOfQueue to .............................. .

4. Increment ................................... .

5. Set the ............................ at the index stored in ........................... to the ............................ being added.

6. Stop.

[6]

Question 8

4 A procedure RandList() will output a sequence of 25 random integers, where each integer is larger than the previous one.

Part (d)

Module GetData() returns the data field from a message that has been received. If no

message is available, the module waits until one has been received.

Explain the limitation of this on module Chat() from part (c).

Describe a modification to GetData() to address this limitation.

Limitation ..................................................................................................................................

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

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

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

Modification ..............................................................................................................................

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

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

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

[3]

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

71% assigned-topic match · Programming › Constructs

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 9618_w23_qp_23.pdf

Keep practising this topic