Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3.
An enumerated type lists every allowed value in brackets after TYPE.
TYPE Vehicle = (M100, M230, T101, T102, T120, T150)
TYPE Vehicle = [1]
All six values in brackets [1]
Use STRING for text, including codes and telephone numbers (a phone number is not used in sums, and may start with 0). Use DATE for the date and the enumerated type Vehicle for the taxi.
TYPE Booking
DECLARE BookingNumber : STRING
DECLARE Destination : STRING
DECLARE ClientName : STRING
DECLARE ClientTelephone : STRING
DECLARE DateOfDeparture : DATE
DECLARE PickupAddress : STRING
DECLARE TaxiUsed : Vehicle
ENDTYPETYPE Booking and ENDTYPE correct [1]
DECLARE used correctly for every field [1]
Any four fields with correct types [1]
The remaining fields with correct types [1]
▶ Topic lesson
A lesson on this topic · by ZAINEMATICS. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.