Two descriptions of user-defined data types are given. Give appropriate type declaration statements for each, including appropriate names.
- (a)A data type to hold a set of prime numbers below 20. These prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19[2]
- (b)A data type to point to a day in the week, for example Monday.[2]
Mark scheme
Marking points from the official mark scheme (May/June 2023). The mark or mark type is shown in brackets.
- [2] (a) One mark per mark point (Max 2) • TYPE Prime • = (2, 3, 5, 7, 11, 13, 17, 19) Example answer TYPE Prime = (2, 3, 5, 7, 11, 13, 17, 19)
- [2] (b) One mark per mark point (Max 2) • TYPE TDayPointer • = ^STRING //^DayOfWeek Example answer TYPE TDayPointer = ^STRING // ^DayOfWeek
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 →