AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
RECORD Car make : String model : String reg : String price : Real…
Full specification wording
Data structures: RECORD Car make : String model : String reg : String price : Real noOfDoors : Integer ENDRECORD
This pseudocode declares a record type called Car.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 2 of 2
Study notes
From the checked teaching notes for this specification point.
The idea
This pseudocode declares a record type called Car. A record groups several named fields, each with its own data type, so one variable of type Car can hold all the details of a single car together. Here make, model and reg are String fields because they store text such as a manufacturer name, a model name or a registration plate. price is a Real field because it can hold a decimal value such as 12999.99. noOfDoors is an Integer field because door counts are whole numbers. RECORD opens the definition and ENDRECORD closes it. The field names and types sit between them, each written as name : type. A question may ask you to identify a field's type, spot a wrongly typed field, or state how many fields the record has.
What earns the marks
- Identifies make, model and reg as String fields that store text values.
- Identifies price as a Real field that can store a decimal value.
- Identifies noOfDoors as an Integer field that stores a whole number.
- States that the record groups five named fields of different types under one type name, Car.
- Recognises that RECORD and ENDRECORD mark the start and end of the record definition.
Common mistakes and how to put them right
Treats price as an Integer.
Put it right by noting that Real allows decimal parts such as 12999.99.
Assumes every field must share one data type.
Put it right by noting that each field declares its own type.
Confuses a record with an array.
Put it right by noting that a record's fields are named and can differ in type.
Exam tips
- Read each field line as name, colon, type, and match the type to the kind of value stored.
- Check whether a value could have a decimal part before choosing Real over Integer.
- Count the field lines between RECORD and ENDRECORD to answer questions about the number of fields.
Try the lesson
The start of the Data structures: RECORD Car make : String model : String reg : String price : Real noOfDoors : Integer ENDRECORD lesson, made from checked teaching notes for this specification point.
Have a go first
A program defines a record type Car with fields make, model, reg, price and noOfDoors. Which of these is the most suitable data type for the field noOfDoors?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Data structures: RECORD Car make : String model : String reg : String price : Real noOfDoors : Integer ENDRECORD
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge