Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3.
A record lets you group several related items under one name. Write any three of these:
A record is a composite data type [1]
It is made up of other data types, which form one new data type [1]
The items can be primitive types (such as INTEGER or STRING) or other user-defined types [1]
Other points that score: it holds related items, and it has a fixed number of items (fields).
Start with TYPE and the name, DECLARE each field with its data type, and finish with ENDTYPE.
TYPE Order
DECLARE AccountNumber : INTEGER
DECLARE OrderNumber : INTEGER
DECLARE OrderPrice : REAL
DECLARE OrderDate : DATE
ENDTYPETYPE Order and ENDTYPE correct [1]
DECLARE used correctly for every field [1]
Account number and order number given an integer type [1]
Order price as REAL and order date as DATE [1]
▶ Whole paper
Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.