Skip to main content
O-LevelComputer ScienceProgramming2210/21 · May/June 2022 · Q120 Marks

You are advised to spend no longer than 40 minutes answering this section. Here is a copy of the pre-release material. DO NOT attempt Tasks 1, 2 and 3 now. Use the pre-release material and your experience from attempting the following tasks before the examination to answer Question 1. Pre-release material Friends of Seaview Pier is an organisation devoted to the restoration and upkeep of a pier in the town. A pier is a wooden structure that provides a walkway over the sea. The pier requires regular maintenance and the friends of the pier need to raise money for this purpose. Members of Friends of Seaview Pier each pay $75 per year, as a contribution to the pier's running costs. This entitles them to free admission to the pier throughout the year. They can also volunteer to help run the pier, by working at the pier entrance gate, working in the gift shop, or painting and decorating. To provide additional income, the pier's wooden planks can be sponsored. A brass plaque, which contains a short message of the sponsor's choice, is fitted to a plank on the pier, for a donation of $200. Write and test a program or programs for the Friends of Seaview Pier: • Your program or programs must include appropriate prompts for the entry of data. Data must be validated on entry. • All outputs, including error messages, need to be set out clearly and understandably. • All variables, constants and other identifiers must have meaningful names. You will need to complete these three tasks. Each task must be fully tested. Task 1 - becoming a member of Friends of Seaview Pier Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter: • their first name and last name • whether or not they wish to work as a volunteer Ο if they choose to volunteer, identify the area from: – the pier entrance gate – the gift shop – painting and decorating • the date of joining • whether or not they have paid the $75 fee. All of this information needs to be stored using suitable data structures. Task 2 - using the membership data Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following categories: • Members who have chosen to work as volunteers. • Volunteers who would like to work at the pier entrance gate. • Volunteers who would like to work in the gift shop. • Volunteers who would like to help with painting and decorating tasks. • Members whose membership has expired (they have not re-joined this year). • Members who have not yet paid their $75 fee. Task 3 - sponsoring a wooden plank Add an additional option to the program in Task 1 to enable the pier's wooden planks to be sponsored. Separate data structures should be used to store the names of the individuals and the short messages they would like to have written on their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200.

  1. (a)Describe the data structures you could have used in Task 1. Your description should include types of data structure, names used for data structures, their uses and examples of sample data.[5]
  2. (b)Explain how you could change your program in Task 1 to total all the money collected from new members who have paid.[3]
  3. (c)Describe how data input in Task 1 could be validated to find out if a new member wants to work as a volunteer.[3]
  4. (d)Write an algorithm to show how your program completes Task 3 assuming the option to sponsor a wooden plank has been chosen, using pseudocode, programming statements or a flowchart. Details completed in Task 1 are not required.[5]
  5. (e)Explain how your program allows any one of the member or volunteer lists to be selected and displayed (part of Task 2). Any programming statements used in your answer must be fully explained.[4]

Mark scheme

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

  1. [5] One mark per mark point, max five
  2. Data Structure(s), max two
  3. MP1 arrays
  4. MP2 variable(s) / constant(s)
  5. Further description, max three
  6. MP3 name(s) one or more
  7. MP4 sample data for appropriate arrays or variables
  8. MP5 use(s) one or more
  9. Additional data structure description using the same data structure type, max one
  10. MP6 two or more full descriptions of the data structure including name, sample data and use
  11. For example:
  12. An array (1) named FirstName (1) to store the first names of the members (1) such as James (1). A variable (1) could also be used to enter whether or not they wish to volunteer. (5 marks)
  13. A variable (1) named FirstName (1) to input the first names of the members (1) such as James (1). A variable could also be used to enter whether or not they wish to volunteer, with sample data of 'yes' (1). (5 marks)
  14. Task 1 - becoming a member of Friends of Seaview Pier
  15. Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter:
  16. • their first name and last name
  17. • whether or not they wish to work as a volunteer
  18. Ο if they choose to volunteer, identify the area from:
  19. Ο the pier entrance gate
  20. Ο the gift shop
  21. Ο painting and decorating
  22. • the date of joining
  23. • whether or not they have paid the $75 fee.
  24. All of this information needs to be stored using suitable data structures.
  25. [3] Explanation of how each was done. Code is allowed, but must be fully explained.
  26. One mark per mark point, max three
  27. MP1 add/use a (new) variable/array to total the membership fee money // total number of members who have paid
  28. MP2 initialise the totalling variable to 0 at the start of the program
  29. MP3 check whether the new member has paid the $75 fee using a conditional statement
  30. MP4 ...if they have paid, and the amount paid is being totalled, add 75 to the current running total of the membership fee total
  31. MP5 ...if they have paid, and the number of paid members is being totalled, add 1 to the total number of members who have paid
  32. MP6 ...if they have paid, and the number of paid members is being totalled, multiply total by 75, to give total paid.
  33. [3] Any code must include a description of what it is for.
  34. One mark per mark point, max three
  35. Max two for just naming different appropriate validation checks
  36. MP1 apply a presence check // to ensure that data has been entered (to the question do you want to work as a volunteer?)
  37. MP2 apply a type check // to ensure that data has been entered of the correct data type e.g. integer if the response required is 1 or 0
  38. MP3 checking the valid inputs would be either yes or no // apply a check to ensure that the data matches the expected input
  39. MP4 the valid inputs would be to choose in which area the new member wishes to volunteer e.g. a list of areas
  40. MP5 if input is not valid, an error message is output (and a new input is requested)
  41. MP6 if input is valid, the program continues
  42. [5] One mark per mark point, max five
  43. MP1 input for sponsor's name / name taken from previous data // input for message on plaque
  44. MP2 both inputs correct with appropriate prompts // input for message on plaque correct with appropriate prompt and name taken from previous data
  45. MP3 output of input(s) for confirmation
  46. MP4 method for sponsor to confirm that the input(s) are correct
  47. MP5 method to enable re-entry of message on plaque if errors made
  48. MP6 charge of $200 acknowledged / charged / confirmed / displayed
  49. MP7 (name and) message stored in arrays
  50. MP8 array index incremented for next sponsor
  51. Task 3 - sponsoring a wooden plank
  52. Add an additional option to the program in Task 1 to enable the pier's wooden planks to be sponsored. Separate data structures should be used to store the names of the individuals and the short messages they would like to have written on their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200.
  53. Example answer
  54. ArrayIndex ← 0 //initial array's index
  55. Check ← "N"
  56. WHILE Check <> "Y"
  57. OUTPUT "Enter your name"
  58. INPUT Name
  59. OUTPUT "Enter the message you would like on your brass plaque"
  60. INPUT Message
  61. OUTPUT "The data you have entered is, name: ", Name, " and your message for the plaque is: ", Message
  62. OUTPUT "Is this correct (Y or N)"
  63. INPUT Check
  64. IF Check <> "Y"
  65. THEN
  66. OUTPUT "The data entered is incorrect, please re-enter"
  67. ENDIF
  68. ENDWHILE
  69. PlankName [ArrayIndex] ← Name
  70. Message [ArrayIndex] ← Message
  71. ArrayIndex ← ArrayIndex + 1
  72. OUTPUT "The fee for this service is $200"
  73. //some method of paying the fee or acknowledgement of the fee
  74. [4] Explanation of how each was done. Code is allowed, but must be fully explained.
  75. One mark per mark point, max four
  76. MP1 a menu is provided/options are displayed so that the user can choose which of the lists they wish to see
  77. MP2 the user inputs a number/code as shown on the menu corresponding to their menu choice
  78. MP3 attempt to validate input
  79. MP4 if it does not match an option, give an error message and ask for re-input
  80. MP5 if it matches an option, a range of IF statements/conditional statements/CASE statement are/is used to compare the input with the available options
  81. MP6 output the chosen list e.g. using a loop to output the contents of the appropriate first and second name arrays corresponding to the user input
  82. MP7 identification of empty list and appropriate action
  83. Task 2 - using the membership data
  84. Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following categories:
  85. • Members who have chosen to work as volunteers.
  86. • Volunteers who would like to work at the pier entrance gate.
  87. • Volunteers who would like to work in the gift shop.
  88. • Volunteers who would like to help with painting and decorating tasks.
  89. • Members whose membership has expired (they have not re-joined this year).
  90. • Members who have not yet paid their $75 fee.

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
Programming, O-Level Computer Science (syllabus 2210). Structured question, 20 marks.
Source
O-Level Computer Science, May/June 2022 Paper 2 Variant 1, question 1.

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