A program is being developed for the management of a sports centre.
- (a)(i)The programmer developing the software decides to use modules (procedures or functions) and local variables. They also decide not to use global variables. State two reasons why the programmer decides to use modules.[2]
- (a)(ii)State one difference between local and global variables.[1]
- (a)(iii)State two benefits of using local variables.[2]
- (b)The pseudocode design contains a number of expressions. Complete each pseudocode expression so that it evaluates to the value shown. Refer to the insert for the list of pseudocode functions and operators. Expression Evaluates to ..........................(68) 'D' ..........................(04/02/2025) 2 ..........................TRUE FALSE ..........................("Court1.4Upper" .........) 1.4[5]
- (c)The table lists some of the variables used in the program. Complete the table by writing the most appropriate data type for each variable. Variable Use of variable Data type MemberCount stores how many members have used the sports centre each day TotalTakings stores the total amount of money taken each day BookingConfirmed stores the state of a booking for an exercise class; a booking is either confirmed or not confirmed MemberDOB to calculate when to send an email with a birthday message to a member[4]
Mark scheme
Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.
- [2] MP1 When a task/module is repeated / reused / called // performed in several places
- MP2 A specific task can be identified /coded as a module / subroutine / procedure / function.
- MP3 Reduces complexity of program / code // Program / code is simplified
- MP4 Module / subroutine / procedure / function already available.
- MP5 Testing / debugging / maintenance is easier
- Max 2
- [1] MP1 Local variables are used within a module // are accessible only within the module (in which they are declared)
- MP2 Global variables are accessible to all parts of the program /
- MP3 Local variables use memory only while the module in is executing // Global variables use memory for the whole time the program is running
- Max 1
- [2] MP1 The same variable name can be reused in other parts of the program
- MP2 Using local variables makes modules self-contained // cannot accidentally change the same identifier outside of the module
- MP3 Using local variables aids modularisation.
- MP4 Memory allocated to local variables can be reused when module not in use
- Max 2
- [5] Mark as follows:
- Expression: CHR(68) Evaluates to: 'D' Mark: 1
- Expression: MONTH(04/02/2025) Evaluates to: 2 Mark: 1 // -2 + DAY (04/02/2025) // -2023 + YEAR(04/02/2025)
- Expression: NOT TRUE Evaluates to: FALSE Mark: 1 // FALSE = TRUE
- Expression: STR_TO_NUM(MID("Court1.4Upper",6,3)) Evaluates to: 1.4 Mark: 2
- Mark Row 4 as follows: STR_TO_NUM 1 mark MID("Court1.4Upper",6,3) 1 mark
- [4] Variable: MemberCount Data type: INTEGER
- Variable: TotalTakings Data type: REAL
- Variable: BookingConfirmed Data type: BOOLEAN
- Variable: MemberDOB Data type: DATE
- Mark as follows: 1 mark per row
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 →