1. A programmer wants to write a program to calculate the baggage charge for a passenger’s airline flight.
Two types of ticket are available for a flight:
• economy class (coded E)
• standard class (coded S)
Each ticket type has a baggage weight allowance as shown below. The airline makes a charge if the weight exceeds the allowance.
(a) A program flowchart will document the program. The flowchart will contain the following statements:
Complete the flowchart by putting the appropriate statement number in each flowchart symbol. Statement 5 has been done for you.
[6]
(b) The programmer needs data to test the flowchart.
Complete the table of test data below to show five tests.
[5]
(c) The program design is to be amended. The value input by the user for the ticket type is to be validated. Part of the amended flowchart is shown below.
Write pseudocode to use a pre-condition loop for this validation.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
xx