User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 426,790 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 1,765 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: Programming Forums
Views: 570 | Replies: 9
Reply
Join Date: Aug 2008
Posts: 2
Reputation: aumi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aumi aumi is offline Offline
Newbie Poster

Airline Ticket Reservations System

  #1  
Aug 8th, 2008
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).
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,189
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 38
Solved Threads: 931
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Most Valuable Poster

Re: Airline Ticket Reservations System

  #2  
Aug 9th, 2008
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.
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
Reply With Quote  
Join Date: Aug 2008
Posts: 2
Reputation: aumi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aumi aumi is offline Offline
Newbie Poster

Re: Airline Ticket Reservations System

  #3  
Aug 9th, 2008
Actually i can't understand how to cancel reservation
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,189
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 38
Solved Threads: 931
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Most Valuable Poster

Re: Airline Ticket Reservations System

  #4  
Aug 9th, 2008
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
Reply With Quote  
Join Date: Dec 2006
Posts: 1,431
Reputation: Aia is a name known to all Aia is a name known to all Aia is a name known to all Aia is a name known to all Aia is a name known to all Aia is a name known to all 
Rep Power: 10
Solved Threads: 99
Aia's Avatar
Aia Aia is offline Offline
Nearly a Posting Virtuoso

Re: Airline Ticket Reservations System

  #5  
Aug 9th, 2008
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 : Aug 9th, 2008 at 1:35 pm.
"No man's life, liberty, or property is safe while the legislature is in session." ~ Mark Twain
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 46
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Airline Ticket Reservations System

  #6  
Aug 12th, 2008
Huge Program Due: August 10th.
Percent compete: 0%.
Strategy: wait til August 8th, then Teh Internets will save me.



LOL same shit, different day.





.
Last edited by jephthah : Aug 12th, 2008 at 6:05 pm.
Why so serious?
Reply With Quote  
Join Date: Jun 2007
Posts: 37
Reputation: Chaster is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Chaster Chaster is offline Offline
Light Poster

Re: Airline Ticket Reservations System

  #7  
Aug 13th, 2008
Originally Posted by aumi View Post
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.
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 46
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Airline Ticket Reservations System

  #8  
Aug 13th, 2008
^ let it go, dude
Why so serious?
Reply With Quote  
Join Date: Jun 2007
Posts: 37
Reputation: Chaster is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Chaster Chaster is offline Offline
Light Poster

Re: Airline Ticket Reservations System

  #9  
Aug 13th, 2008
Originally Posted by jephthah View Post
^ let it go, dude

Right... If he/she cannot even describe what the problem is...
Reply With Quote  
Join Date: Feb 2008
Location: Seattle
Posts: 713
Reputation: jephthah is a jewel in the rough jephthah is a jewel in the rough jephthah is a jewel in the rough 
Rep Power: 4
Solved Threads: 46
jephthah's Avatar
jephthah jephthah is offline Offline
Master Poster

Re: Airline Ticket Reservations System

  #10  
Aug 13th, 2008
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.
Why so serious?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 6:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC