Australasian Airways Pty Ltd, is an Australian low-cost airline headquartered in Sydney. The airline operates daily direct services from Sydney to 4 different cities, Auckland, Melbourne, Gold Coast and Perth using a mixed fleet of the Airbus A320 family and the Boeing 787 Dreamliner. Recently, the Executive committee of the airline has decided to install self-service check-in kiosks for passengers to check themselves in for their flight and print their own E-boarding passes. The top administration of the airline has contacted you to design and create a prototype for the check-in kiosks.
Each passenger receives a 7-character long e-ticket number, e.g. AB3426C, while purchasing a ticket from the airline. To print the E-boarding pass, the program requires a passenger to enter details such as e-ticket number, full name, and destination for the flight. It then determines the flight number, seat number, and gate number for the flight and print the boarding pass for the passenger. In cases where a passenger enters an invalid destination, the program displays an appropriate error message.
At the Sydney domestic airport, the flights to a given destination are assigned to the same flight number and depart from the same gate as shown in Table 1. For example, all flights to Melbourne have a flight number, AA176 and depart from gate 32. The program calculates the seat number by extracting the last three characters from the 7-character long e-ticket number. For instance, the seat number for a passenger with a e-ticket number of A83426C will be 26C.