A program is needed to manage individual rentals in a car-hire business. The data items for each rental will be held in a record structure of type RentalRecord The programmer has started to define the items that will be needed: Item Example value Comment RentalID "AB1234" a unique alpha-numeric value CarID 241 a numeric value used as an array index DisCode 'S' a letter indicating the type of discount offered Start 13/06/2025 when the rental starts Duration 7 the number of days of the rental Completed FALSE TRUE when the car is returned and the rental charge paid
- (a)(i)Write pseudocode to declare the record structure for type RentalRecord[4]
- (a)(ii)A 1D array Rental containing 500 elements is used to store the data for all rental records. Write pseudocode to declare the Rental array.[2]
- (b)State three benefits of using an array of records to store the data for all rentals.[3]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2025). The mark or mark type is shown in brackets.
- [4] (a)(i) One mark for TYPE RentalRecord and ENDTYPE statements
- [4] (a)(i) One mark for RentalID and CarID declared correctly
- [4] (a)(i) One mark for DisCode and Start declared correctly
- [4] (a)(i) One mark for Duration and Completed declared correctly
- [2] (a)(ii) DECLARE Rental : ARRAY[1:500] OF RentalRecord
- [3] (b) Different data types held (for each rental) under a single identifier
- [3] (b) Allows for iteration through rentals/records // Can access rentals/records in a loop // Can (directly) access a specific rental/record using an (array) index
- [3] (b) Simplifies the code/program / less code needed / reduces code duplication // Makes code/program easier to understand // Makes testing / debugging easier // Program maintenance easier
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 →