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.
- (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]
- (b)Explain how you could change your program in Task 1 to total all the money collected from new members who have paid.[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]
- (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]
- (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.
- [5] One mark per mark point, max five
- Data Structure(s), max two
- MP1 arrays
- MP2 variable(s) / constant(s)
- Further description, max three
- MP3 name(s) one or more
- MP4 sample data for appropriate arrays or variables
- MP5 use(s) one or more
- Additional data structure description using the same data structure type, max one
- MP6 two or more full descriptions of the data structure including name, sample data and use
- For example:
- 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)
- 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)
- 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.
- [3] Explanation of how each was done. Code is allowed, but must be fully explained.
- One mark per mark point, max three
- MP1 add/use a (new) variable/array to total the membership fee money // total number of members who have paid
- MP2 initialise the totalling variable to 0 at the start of the program
- MP3 check whether the new member has paid the $75 fee using a conditional statement
- MP4 ...if they have paid, and the amount paid is being totalled, add 75 to the current running total of the membership fee total
- 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
- MP6 ...if they have paid, and the number of paid members is being totalled, multiply total by 75, to give total paid.
- [3] Any code must include a description of what it is for.
- One mark per mark point, max three
- Max two for just naming different appropriate validation checks
- MP1 apply a presence check // to ensure that data has been entered (to the question do you want to work as a volunteer?)
- 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
- MP3 checking the valid inputs would be either yes or no // apply a check to ensure that the data matches the expected input
- MP4 the valid inputs would be to choose in which area the new member wishes to volunteer e.g. a list of areas
- MP5 if input is not valid, an error message is output (and a new input is requested)
- MP6 if input is valid, the program continues
- [5] One mark per mark point, max five
- MP1 input for sponsor's name / name taken from previous data // input for message on plaque
- MP2 both inputs correct with appropriate prompts // input for message on plaque correct with appropriate prompt and name taken from previous data
- MP3 output of input(s) for confirmation
- MP4 method for sponsor to confirm that the input(s) are correct
- MP5 method to enable re-entry of message on plaque if errors made
- MP6 charge of $200 acknowledged / charged / confirmed / displayed
- MP7 (name and) message stored in arrays
- MP8 array index incremented for next sponsor
- 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.
- Example answer
- ArrayIndex ← 0 //initial array's index
- Check ← "N"
- WHILE Check <> "Y"
- OUTPUT "Enter your name"
- INPUT Name
- OUTPUT "Enter the message you would like on your brass plaque"
- INPUT Message
- OUTPUT "The data you have entered is, name: ", Name, " and your message for the plaque is: ", Message
- OUTPUT "Is this correct (Y or N)"
- INPUT Check
- IF Check <> "Y"
- THEN
- OUTPUT "The data entered is incorrect, please re-enter"
- ENDIF
- ENDWHILE
- PlankName [ArrayIndex] ← Name
- Message [ArrayIndex] ← Message
- ArrayIndex ← ArrayIndex + 1
- OUTPUT "The fee for this service is $200"
- //some method of paying the fee or acknowledgement of the fee
- [4] Explanation of how each was done. Code is allowed, but must be fully explained.
- One mark per mark point, max four
- MP1 a menu is provided/options are displayed so that the user can choose which of the lists they wish to see
- MP2 the user inputs a number/code as shown on the menu corresponding to their menu choice
- MP3 attempt to validate input
- MP4 if it does not match an option, give an error message and ask for re-input
- 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
- 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
- MP7 identification of empty list and appropriate action
- 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.
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 →