Computer Science · Oct / Nov 2022 · Paper 21 · Question 1
0478
As printed in the paper
The question as text
All variables, constants and other identifiers must have meaningful names.
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
1(a)(i)[5]
Many correct answers, the names used must be meaningful. The names given are examples only.
One mark per mark point, max five
MP1
name one e.g. Name, Age, Gender, Type, TeamMember, AnnualFee, Paid
MP2
one appropriate data type must match name e.g. string, integer, char, string, Boolean, real, Boolean
MP3
sample data for one appropriate array
MP4
all arrays mentioned have appropriate names
MP5
all arrays mentioned have appropriate data types
MP6
sample data for all arrays e.g. Sue, 9, F, Junior, True, 9.00, False
1(a)(ii)[2]
One mark per mark point, max two
MP1
use a loop e.g. FOR…NEXT / REPEAT…UNTIL / WHILE…DO
MP2
to input the values for each element in every array
MP3
append each value input to the end of the array
1(b)[2]
One mark per mark point, max two
MP1
use a loop/ FOR/REPEAT/WHILE to check all members
MP2
use a conditional statement / IF to see if the paid field is marked as False
MP3
only transfer the data of those members whose paid field is marked as True to a set of new arrays
// delete the details of the members who have not paid
1(c)[6]
One mark per mark point, max six
MP1
loop through all the members
MP2
any suitable correct comparison of age
MP3
if 18 Change membership type to adult
MP4
if 50 Change membership type to senior
MP5
if 80 Change membership type to golden
MP6
check if team member
MP7
no store appropriate full fee
MP8
yes store 90% of appropriate full fee
Example
FOR Member ← 1 TO Total
CASE Age[Member] OF
18 : Type[Member] ← "Adult"
50 : Type[Member] ← "Senior"
80 : Type[Member] ← "Golden"
ENDCASE
IF Team[Member]
THEN
CASE Type[Member] OF
"Junior" : Fee[Member] ← JuniorFee * 0.9
"Adult" : Fee[Member] ← AdultFee * 0.9
"Senior" : Fee[Member] ← SeniorFee * 0.9
ENDCASE
ELSE
CASE Type[Member] OF
"Junior" : Fee[Member] ← JuniorFee
"Adult" : Fee[Member] ← AdultFee
"Senior" : Fee[Member] ← SeniorFee
"Golden" : Fee[Member] ← GoldenFee
ENDCASE
ENDIF
NEXT Member
1(d)[5]
Explanation
One mark per mark point, max five
MP1
how the program checked all the members // use of loop
MP2
how the program identified a member who has not paid their (annual) fee // use of condition
MP3
how the program kept a running total of members who have not paid their (annual) fees
MP4
for each of the three types of membership that require a fee // excluding golden members
MP5
how the program calculated a percentage for members who had not paid…
MP6
for each of the three types of membership that require a fee
MP7
how the program displayed a percentage for members who had not paid
MP8
all three percentages displayed with suitable messages
Programming statements when used must be explained.
Section B
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

