Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Task1 v3.

2 PRM P21 May June 2021-22

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

5 WPSponsor=200
10 ConstMFee=75
15 TodaysDate=17052022 //This is exam date or todays date to find out membership expiry when needed
20 MCounter=1
30 Repeat //Main Loop Body
40 Print"Enter First Name"
50 Input FirstName[MCounter]
60 Print"Enter Last Name"
70 Input LastName[MCounter]

71 repeat // this is a sub loop for validation of isvolunteer input.


80 Print "Will you be a volunteer? Y/N"
90 Input IsVolunteer[Mcounter]
91 If IsVlunteer[Mcounter]<>'Y' or IsVlunteer[Mcounter]<>'N'
92 Then
93 Print "Invalid Input, Kindly Try again"
94 End If
95 Until IsVolunteer[Mcounter]='Y' or IsVolunteer[Mcounter]='N'
100 If IsVolunteer[Mcounter]='Y'

110 Then

120 print "where will you work?"


130 Print "1. Pier Entrance Gate"
140 Print "2. Gift Shop"
150 Print "3. Painting & Decorating"
155 Repeat // this is a sub loop for validation
156 Print "Enter Volunteer work Area, 1, 2, 3"
160 Input VWArea[Mcounter]
161 If VWArea[Mcounter] <> 1 or VWArea[Mcounter]<> 2 or VWArea[Mcounter]<>3
162 Then
163 Print "Invalid Input, Kindly Try again"
164 End If
165 Until IsVolunteer[Mcounter]='Y' or IsVolunteer[Mcounter]='N'
170 Endif

175 Repeat // Validation routine for date input


180 Print "Enter date of joining DDMMYYYY"
190 Input DateOfJoining[Mcounter]
191 If DateOfJoining[Mcounter]> 31122023 or DateOfJoining[Mcounter] < 01012022
192 Then
193 Print "Invalid Input, Kindly Try again"
Task1 v3.2 PRM P21 May June 2021-22

194 End If
195 Until DateOfJoining[Mcounter]<31122023 and DateOfJoining[Mcounter]>01012022
200 Print "have you paid the fee? $75"
210 Input IsMFeePaid[MCounter]

220 Repeat //Plank sponsoring loop with validation


230 Print “Is member interested in Sponsoring a Plank”
240 input IsSponsoring[Mcounter]
250 IF IsSponsoring[Mcounter]=’Y’ or IsSponsoring[Mcounter]=’y’
260 then
270 Print Kindly “Enter Name of the Sponsor”
280 Input SponsorName[Mcounter]
290 Print Kindly “Enter Message to be Printed”
300 Input SponsorMessage[Mcounter]
310 Print “Is”, SponsorName[Mcounter], “and Message”,, SponsorMessage[Mcoutner],, “Correct? Y/ N”
320 input Confirmation
340 Until Confirmation<>’Y’ or Confirmation<>’y’

350 Print "Do you want to add more members Y/N"


360 Input EntryStatus
370 If EntryStatus='Y' then MCounter=MCounter+1
380 Untill EntryStatus='N'

You might also like