Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 1 of 3.
Any three of these:
A set is a composite user-defined data type. [1]
It holds a list of unordered elements. [1]
Set operations such as union and intersection can be applied to its elements. [1]
Its definition includes the data type it uses. (also credited, but no extra mark: any n only)
All the elements are of the same data type. (also credited, but no extra mark: any n only)
TYPE SymbolSet = SET OF CHAR
DEFINE Operators ('+', '-', '*', '/', '^') : SymbolSetAny four of these:
TYPE SymbolSet = [1]
SET OF CHAR [1]
DEFINE Operators [1]
The five operators in brackets [1]
: SymbolSet after the list (also credited, but no extra mark: any n only)
The type and the variable may swap names (TYPE Operators = SET OF CHAR, then DEFINE SymbolSet) and still score.
▶ 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.