Question 7
Edexcel Computer Science June 2020 Paper 2GCSE10 marks
On the specification
- (a)(i)
- 6.4 Input and output
- (a)(ii)
- 6.3 Data types and structures
- (b)
- 1.2 Algorithms
Question text
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 of fields separated by hyphens. The label begins with the letters ‘D’ or ‘I’. The next field is the destination airport. The next field is the airline code, followed by the flight number. The last field is a four digit item number. Valid labels are shown. • D-LHR-BA-2181-0012 • I-AMS-AA-0302-0125 • I-HND-JL-4522-0317 (i) The labels are validated using standard length, type and presence checks. Give one other validation test that could be used to check the airline code in the label. (1) (ii) Construct an expression, using indexing, to locate the destination airport code in a label. (3) (b) Luggage is sent to either the international or the domestic sorting hub. If the label begins with ‘I’, the item is sent to the international hub. If the label begins with ‘D’, the item is sent to the domestic hub. If the label is damaged and not readable, the item is sent for manual inspection. This shape represents input or output. Draw a flowchart to represent this process for a single item of luggage. Answer space is provided on pages 18 and 19. You may not need to use all of the answer space. Put a line through any work you do not want to be marked. (6)