•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 397,646 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,446 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser:
Views: 411 | Replies: 9
![]() |
•
•
Join Date: Aug 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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).
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).
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,641
Reputation:
Rep Power: 36
Solved Threads: 867
What part(s) of the program don't you know how to write? Sorry, but waiting until the very last minute to get help is not good for your grades.
You need to post the code you have written and ask specific questions. We won't write the program for you.
You need to post the code you have written and ask specific questions. We won't write the program for you.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,641
Reputation:
Rep Power: 36
Solved Threads: 867
depends on how someone reserves a seat. To cancel, just undo the reserve. If you are using an array, just reset the array element back to its initial value, most likely 0.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
People can not help you if you don't post any portion of the code that is not working, or whatever you have done so far. Posting your code will accomplish two vital tasks. It will let people know what current skill level you are at, and it will minimize misunderstanding and guessing work. Furthermore, that will show that you are serious about learning and not just copying and pasting from others.
Last edited by Aia : 20 Days Ago at 1:35 pm.
"No man's life, liberty, or property is safe while the legislature is in session." ~ Mark Twain
•
•
Join Date: Jun 2007
Posts: 34
Reputation:
Rep Power: 2
Solved Threads: 2
•
•
•
•
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).
How do you store the information? (I mean in the memory, in a text file, database?) Different solutions for different approaches... And also, you should post some code, so we can help you without additional questions.
the main point of contention here, is that they have provided zero evidence they have even *attempted* to work on their problem on their own.
this is the signature pattern of a many typical posters here: they cut and paste their homework assignment in the hope that someone will do it for them.
this is the signature pattern of a many typical posters here: they cut and paste their homework assignment in the hope that someone will do it for them.
Why so serious?
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
Other Threads in the C Forum
- Previous Thread: I have few question
- Next Thread: fibonacci



Linear Mode