Past-paper question · 2024 May-June · Paper 23 · Q3(b)

Question 3(b) 2024 · May-June · Paper 23 · 5 marks

Original past-paper question for 3(B)
Original past-paper question for 3(B)
Original past-paper question for 3(B)
Reveal official mark-scheme answer Official mark-scheme answer for 3(B)

Official answer for Question 3

Part (b)

Question 5

✓
Zo ne

Question 1

✓
Zo ne

Question 2

✓
Zo ne

Question 3

✓
Zo ne

Question 4

✓
Zo ne

Question 5

✓
One mark per zone
✓
9618/23
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_s24_ms_23.pdf →

Show text version of question

Question 3

Part (b)

Question 3

A record structure is declared to hold data relating to components being produced in a factory:

TYPE Component DECLARE Item_ID : STRING DECLARE Reject : BOOLEAN DECLARE Weight : REAL ENDTYPE

The factory normally produces a batch (or set) of 1000 components at a time. A global array is declared to store 1000 records for a batch:

DECLARE Batch : ARRAY [1:1000] OF Component

Two global variables contain the minimum and maximum acceptable weight for each component. The values represent an inclusive range and are declared as:

DECLARE Min, Max : REAL

Part (b)

A module InRange() will:

  • be called with an integer parameter representing an index value of a record in the Batch
  • array

  • check if the weight of the indexed component is within the acceptable range
  • return TRUE if the weight is in the range and FALSE if it is not.
A
module BatchCheck() will:
  • iterate through a batch of 1000 component records
  • call module InRange() to check each individual component record
  • keep a count of the number of components that fail
  • output a suitable warning message and immediately stop if the number of failed

components exceeds 5.

Question 7

, ,

Complete the program flowchart to represent the algorithm for module BatchCheck().

START

Is Index = 1001 ?

Yes

No

END

[5]

Question 8

, ,

Topic relevance

Why this question appears here

99% assigned-topic match · Data types and structures › Data types and records

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_s24_qp_23.pdf

Keep practising this topic