May/June 2026 Paper 23

2026 · 8 questions · 27 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong27Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
8(a)(i)Two Dimensional ArraysEasy2 marks
A warehouse stores stock in bins. A bin is a container which stores the stock items; each bin can store many identical items. The warehouse is organised on three different levels – level 0 (ground level), then level 1 and level 2. Each level has 120 bins, numbered 1 to 120. A bin is identified by the level and a bin number. The data item stored for each bin is a Boolean value; this indicates whether the bin is in use (contains stock items) or not in use (contains no stock items). Complete the pseudocode to declare a 2D array Bins
8(a)(ii)Two Dimensional ArraysHard5 marks
A pseudocode module InactiveReport() will produce a report that will show a header for each level, the bin number for each bin that is not in use on that level, and the total number of bins that are not in use on all levels. The module is initially developed for only five bins on each level. An example program output:
pseudocode
Level: ground floorBin 1Bin 3Level: 1Bin 4Level: 2Bin 1Bin 2Bin 56 bins are not in use
This output shows the header for each level, a list of bin numbers for bins that are not in use on that level, and the total number of bins not in use. Complete the pseudocode for the procedure InactiveReport(). Assume that the Bins array is a global variable and has already been populated with data.
pseudocode
PROCEDURE InactiveReport()ENDPROCEDURE

Answer

0 words
8(a)(iii)Two Dimensional ArraysMedium3 marks
Test data were chosen to produce this output:
pseudocode
Level: ground floorBin 1Bin 3Level: 1Bin 4Level: 2Bin 1Bin 2Bin 56 bins are not in use
Complete the pseudocode test data which would produce the output given. Reminder: the module is initially developed for only five bins on each level.
pseudocode
// Ground floorBins[0, 1] ← FALSEBins[0, 2] ← TRUEBins[0, 3] ← ?Bins[0, 4] ← TRUEBins[0, 5] ← TRUE// Level 1Bins[1, 1] ← TRUEBins[1, 2] ← ?Bins[1, 3] ← TRUEBins[1, 4] ← FALSEBins[1, 5] ← TRUE// Level 2(complete all five assignments, Bins[2, 1] to Bins[2, 5])
Bins[0, 3] ←
Bins[1, 2] ←
Level 2: Bins[2, 1] ← … to Bins[2, 5] ← … (all five lines)
0 words
8(b)(i)Records User Defined Data TypesEasy2 marks
It is decided to change the 2D array Bins so that more information is available about each bin. Data items for each bin are: bin size (coded as 'Small', 'Medium' or 'Large'); active – is the bin currently in use?; stock item code for the stock item stored (four-digit string); stock level (0 to 500 items). Complete the pseudocode to create a record structure with the identifier BinData
pseudocode
TYPE BinDataENDTYPE

Answer

0 words
8(b)(ii)Searching AlgorithmsHard7 marks
A stock item is to be allocated to an unused bin. A function FindBin() is required that finds and returns the location of the first bin not in use which has a suitable size. The function will search on the ground floor first, then search level 1 and finally search level 2. The function uses the global 2D array Bins using the revised record structure BinData The function FindBin(): • takes a parameter for the bin size required (coded as 'Small', 'Medium' or 'Large') • searches for an available bin that matches the size required • outputs the level and bin number (as a string) of the first unused bin with the matching size, for example 'Level: 0 Bin: 4', or if there are no available bins 'No bins available'. Write the pseudocode function FindBin()

Answer

0 words