Data types can be defined using pseudocode. The composite record data type, Departure, is used to represent flights from Cambridge Airport and is defined in pseudocode as: TYPE Departure DECLARE FlightNumber : STRING DECLARE Destination : STRING DECLARE FlightDate : DATE DECLARE Gate : STRING DECLARE Airline : STRING ENDTYPE A variable, Flight1, is declared in pseudocode as: DECLARE Flight1 : Departure
- (a)Write pseudocode to store the following details to Flight1: Field | Data FlightNumber | SB2789 Destination | Dublin FlightDate | 30/07/2025 Gate | N03 Airline | Cambridge Airways[3]
- (b)(i)The data type for Gate is changed to an enumerated data type, GateID. Write a pseudocode statement to declare GateID to hold the identity codes for the airport gates: N01, N02, N03, W01, W02, W03, W04[2]
- (b)(ii)Write the new pseudocode statement required to replace the declaration of Gate in Departure.[1]
Mark scheme
Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.
- MP1 Use of correct Flight1 variable with given field names
- MP2 Correct assignments of four string data values
- MP3 Correct assignment of date data value
- Flight1.FlightNumber ← "SB2789"
- Flight1.Destination ← "Dublin"
- Flight1.FlightDate ← 30/07/2025
- Flight1.Gate ← "N03"
- Flight1.Airline ← "Cambridge Airways"
- MP1 TYPE GateID =
- MP2 (N01, N02, N03, W01, WO2, W03, W04)
- TYPE GateID = (N01, N02, N03, W01, WO2, W03, W04)
- DECLARE Gate : GateID
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 →