Skip to main content
A-LevelComputer ScienceData types and structures9618/22 · Oct/Nov 2021 · Q314 Marks

A programmer is writing a program to help manage clubs in a school. Data will be stored about each student in the school and each student may join up to three clubs. The data will be held in a record structure of type Student. The programmer has started to define the fields that will be needed as shown in the following table. Field Typical value Comment StudentID "CF1234" Unique to each student Email "Carmen47@xyzmail.com" Contains letters, numbers and certain symbols Club_1 1 Any value in the range 1 to 99 inclusive Club_2 14 Any value in the range 1 to 99 inclusive Club_3 27 Any value in the range 1 to 99 inclusive

  1. (a)(i)Write pseudocode to declare the record structure for type Student.[3]
  2. (a)(ii)A 1D array Membership containing 3000 elements will be used to store the student data. Write pseudocode to declare the Membership array.[2]
  3. (a)(iii)Some of the elements of the array will be unused. Give an appropriate way of indicating an unused array element.[1]
  4. (a)(iv)Some students are members of less than three clubs. State one way of indicating an unused club field.[1]
  5. (b)A procedure GetIDs() will: • prompt and input the number of a club • output the Student ID of all the students who are members of that club • output a count of all students in the given club. Write pseudocode for the procedure GetIDs().[7]

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2021). The mark or mark type is shown in brackets.

  1. [1] TYPE Student ... ENDTYPE
  2. [1] DECLARE StudentID : STRING, DECLARE Email : STRING
  3. [1] DECLARE Club_1 : INTEGER, DECLARE Club_2 : INTEGER, DECLARE Club_3 : INTEGER
  4. [1] DECLARE Membership : ARRAY [1:3000]
  5. [1] OF Student
  6. [1] Assign a value (of the correct data type) outside the normal range to one of the fields
  7. [1] Assign an empty string to the StudentID field / Email field
  8. [1] or value out of range to any club field
  9. [1] A number outside the range 1 to 99
  10. [1] PROCEDURE GetIDs() ... ENDPROCEDURE
  11. [1] DECLARE Index : INTEGER, DECLARE ThisClub, Count : INTEGER
  12. [1] OUTPUT / INPUT ThisClub before the loop
  13. [1] Count ← 0
  14. [1] FOR Index ← 1 TO 3000 ... NEXT Index // or WHILE loop for 3000 iterations
  15. [1] IF Membership[Index].Club_1 = ThisClub OR Membership[Index].Club_2 = ThisClub OR Membership[Index].Club_3 = ThisClub THEN
  16. [1] OUTPUT Membership[Index].StudentID AND Count ← Count + 1
  17. [1] Final OUTPUT of Count outside the 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
Data types and structures, A-Level Computer Science (syllabus 9618). Structured question, 14 marks.
Source
A-Level Computer Science, Oct/Nov 2021 Paper 2 Variant 2, question 3.

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