When the item of luggage leaves the check-in area, it is sorted and delivered to the aircraft - Edexcel - GCSE Computer Science - Question 7 - 2020 - Paper 1
Question 7
When the item of luggage leaves the check-in area, it is sorted and delivered to the aircraft.
(a) A printed label is attached to each item. Each label is made up o... show full transcript
Worked Solution & Example Answer:When the item of luggage leaves the check-in area, it is sorted and delivered to the aircraft - Edexcel - GCSE Computer Science - Question 7 - 2020 - Paper 1
Step 1
7(a)(i) Look up (1) table
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To determine the components of a valid label, we refer to the properties outlined in the question.
A label is structured as follows:
It begins with either 'D' or 'I'.
The second field indicates the destination airport.
The third field must be the airline code.
The flight number follows next.
Finally, it concludes with a four-digit item number.
Thus, a valid example could be: I-HND-JL-4522-0317, which would break down into the following fields:
I (Indicator)
HND (Destination)
JL (Airline Code)
4522 (Flight Number)
0317 (Item Number)
Step 2
7(a)(ii) One mark for slice indicator (1)
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
In the context of the label structure, the slice indicator refers to how we parse and extract values from the label by indexing into the correct positions. When we say slice indicator here, it signifies that:
The segments of a label can be sliced into arrays for easy reference.
For example, label = ['I', 'HND', 'JL', '4522', '0317'] where label[0], label[1], etc. can be used to reference specific parts of the label.
Step 3
7(b) Use of output box for 'pushing' is acceptable.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
To implement the functionality effectively, we must assess how the given label can interact with an output mechanism. The label can be 'pushed' into an output box, ensuring the retrieval and display of all segments effectively.
For a complete functionality, the label can be structured so:
By segregating the fields using a separator or by indexing, each component can be individually accessed.
Validated to ensure that each part follows the standard format described initially, confirming the integrity of data before processing.