Fly By Night Travel Agency
|Time to complete||Allow 4-5 hours continuous|
|Program Download||FlyByNight.cbl is a model answer. Don't look at this until you have made your own attempt at the program.|
Bookings.dat (The unsorted Bookings file)
|Major Constructs||Indexed Files, Print Files|
The FlyByNight travel agency sends its customers all over the world. For each booking a record is created in the Booking Master file (BOOKING.DAT). Each customer booking is assigned (as part of the record) a category indicating the primary reason for the booking (i.e. Sport, Tourism, Business, Personal and Other). The file is unsorted and each record has the following description;
A program is required which will read the Booking Master file to produce a Summary file sequenced upon ascending Destination-Name. Each record in this file will be a summary of all the Tourist records in the Booking file which list a particular location as their destination. The record will show the Destination-Name, the Total-Receipts from tourists travelling to that destination and the Total-Males, Total-Females and Total-Children who make up that tourist population. Each record in the Summary file has the description shown below;
The Danger Levy
As well as the Booking-Charge, tourists travelling to some destinations will incur an additional insurance charge. This will be levied as a percentage of the Booking-Charge and will be added to it to give a Total-Charge for the booking (e.g. Charge = $250.00, Percentage Insurance = 15%, Total-Charge = $287.50). Listed below are affected countries as well as the insurance charges that travelling to them will incur.
Afghanistan 50%, Cambodia 24%, Corsica 18%, El Salvador 85%,
Note that the Destination-Name in the Booking Master File may be all upper case or all lower case or a mixture. Note also that "France" is not equal to "FRANCE".