Skip to main content
A-LevelComputer ScienceSoftware development9618/21 · May/June 2025 · Q612 Marks

A program monitors the speed of vehicles as they move around a large building site. Each vehicle contains a sensor which reads an integer value that represents the speed of the vehicle. The value is expected to be in the range 0 to 60 inclusive. The sensors cannot read values less than 0. A program module has been written to validate the values read by the sensors.

  1. (a)A test plan is needed to fully test the module. Complete the table. The first line has been completed for you. Assume the sensors generate only integer values. | Type of test data | Test data value | Expected outcome | |:------------------|:----------------|:-------------------| | normal | 36 | data item is accepted | | | | | | | | | | | | | | | | |[4]
  2. (b)Each sensor used in the system has a unique sensor ID number in the range 1 to 50. The program that is used to monitor the speed of each vehicle reads each sensor value every second and stores this value along with the sensor's unique ID into a global 2D array Reading The global array Reading has been declared as follows: DECLARE Reading : ARRAY[1:2000, 1:2] OF INTEGER The array contains 4000 elements organised as 2000 rows and 2 columns. Column 1 contains the sensor value, and column 2 contains the sensor ID. When 2000 sensor readings have been taken, the array is full and the system stops taking any more sensor readings until the array has been processed. A procedure Sort() is needed to sort the array into ascending order of sensor value using an efficient bubble sort algorithm. Write efficient pseudocode for the procedure Sort ()[8]

Mark scheme

Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.

  1. [1] boundary/extreme/normal: 0 / 1, data item is accepted
  2. [1] boundary/extreme/normal: 59 / 60, data item is accepted
  3. [1] abnormal: >= 61, data item is rejected
  4. [1] normal: 15, data item is accepted
  5. [1] Procedure heading and ending
  6. [1] Conditional loop correctly formed including Boolean flag declared and initialised
  7. [1] An inner loop
  8. [1] Correct range 1 to 1999 for inner loop
  9. [1] Comparison of element J with J+1 in a loop
  10. [1] Declare Temp variable and swap elements in a loop
  11. [1] Both SensorID and Speed values were swapped in a loop
  12. [1] 'No-Swap' mechanism: Conditional outer loop including flag reset / Flag set in inner loop to indicate swap
  13. [1] Reducing Boundary in the outer loop

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Software development, A-Level Computer Science (syllabus 9618). Structured question, 12 marks.
Source
A-Level Computer Science, May/June 2025 Paper 2 Variant 1, question 6.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep