Hi, i need some help. i have an assignment on "Airline Ticket Reservations System". i have to submit it on 10th August, 2008. I tried but can't solve it. please help me.
The question is given below :
1. Consider a new airline agency “BEST AIR” that launches recently in Bangladesh. They hire you as a Programmer to design their “Airline Ticket Reservations System”. They fly an Airbus that operates from Dhaka to Chittagong regularly. Total seat capacity in this plane is Hundred (100). First Twenty (20) seats are reserved for business class and the rest is for Economy class. You have to write a program that will give the following output:
********************************************
Welcome to Best Air Ticket Reservation System
Type 1 for Ticket Reservation
Type 2 for Seat Cancellation
********************************************
a) If he presses 1 then make the following output:
********************************************
Type 1 for Business Class
Type 2 for Economic Class
********************************************
If a user is interested to fly in Business class he will type 1 and for Economic class type 2.
If you do not have a capacity for business class (all 20 seats are occupied) your program will ask him with the following output in screen:
All Business Class seats are filled. Please type 2 for Economic class
If he types 2 and there are seats in Economic class put him in that class, if he is interested to fly only in Business class (by pressing 1) you should make the following output:
All Business Class seats are filled. Please try tomorrow flight.
If there is no seat in Economic Class your program will give option to put him in the business class by giving output
We have available seats in Business Class but you have to buy it with additional 1500 BDT. To Continue Press 1. If he does not press 1 give the following output:
All seats are filled. Please try tomorrow flight.
For all other successful seat reservations, issue the boarding pass by printing the seat number and the class (Business or Economic).
b) if he presses 2 then ask for his seat number and cancel his reservation. Make sure that this cancelled seat has been added to the available seats (either economic or business).