A programmer is writing a program to manage a video library. They require a user-defined data type.
- (a)Write pseudocode statements to declare the composite data type VideoLibrary to hold data about each video in the collection. This data includes: • identity code (any combination of letters and numbers) • title • year released • date purchased • format (for example DVD, Blu-ray, 4K, MP4) • running time (minutes) Use the most appropriate data type in each case.[4]
- (b)Identify one field in VideoLibrary that could be an efficient enumerated data type and give a reason for your choice. Field Reason[2]
Mark scheme
Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.
- [1] MP1 TYPE VideoLibrary and ENDTYPE correct
- [1] MP2 Declare used correctly for every field in the response
- [1] MP3 All Three STRING fields correct (shaded)
- [1] MP4 Remaining Three fields correct (unshaded)
- [2] One mark for identification of field and one mark for reason
- VideoFormat
- This field can have a fixed range of possible values
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 →