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 401,707 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 3,947 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.
Views: 4087 | Replies: 10
Reply
Join Date: May 2006
Posts: 7
Reputation: wwaall2004 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wwaall2004 wwaall2004 is offline Offline
Newbie Poster

Help plz help(Airline Reservation System)

  #1  
May 10th, 2006
hi every one

iam new member in your sites

and i hope i will find what iam looking for:rolleyes:

so my friends i really want ur help

iam students in univerisity 3rd level and our teacher ask us to write program in c++

this one below


{
Develop an Airline Reservation System in which five arrays are maintained. The first array has the names of the customers, the second array has the number of seats the customer wants, the third array has the destination city of customer, the fourth array has the amount he has paid, and the fifth array has information about whether the customer’s reservation is confirmed or not – so this fifth array can have values either ‘confirmed’ or ‘unconfirmed’. Your program should read arbitrary data from an input file "reservations.txt", and then displays a menu with the following options:

1. Add a new reservation
2. Show details of a reservation (given reservation number)
3. Make Payment (given the reservation number and payment amount)
4. Confirm a Reservation (given the reservation number)
5. Quit

The index of the array should be taken as the Reservation number. So for example if you want to check or update any information related to reservation number 3, then you can actually work with the values in the third index of all the arrays. If you add a new reservation, then obviously a new reservation number will be generated as you will add a new index in all the arrays.
When your program is quit you should make sure that before quitting all the changes in the arrays are written into the “reservation.txt� – Basically all information in “reservation.txt� should be updated according to all activities done in your program, e.g. adding a new reservation, making payment and confirming reservation.

You should apply modular programming, with a separate function for each major task in your program.
}

so iam really want ur help in that

and thank u very much

and this is my e-mail
(hot_sun_03@hotmail.com)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation: aniseed is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 5
aniseed's Avatar
aniseed aniseed is offline Offline
Posting Whiz

Re: plz help(Airline Reservation System)

  #2  
May 10th, 2006
We are not here to do your homework. Let's start with how you have thought of approaching the problem first. We will be helping you on the way.
Reply With Quote  
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation: aniseed is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 5
aniseed's Avatar
aniseed aniseed is offline Offline
Posting Whiz

Re: plz help(Airline Reservation System)

  #3  
May 10th, 2006
Reply With Quote  
Join Date: May 2006
Posts: 7
Reputation: wwaall2004 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wwaall2004 wwaall2004 is offline Offline
Newbie Poster

Re: plz help(Airline Reservation System)

  #4  
May 10th, 2006
ok

i will start....

#include <stdio.h>
#include<stdlib.h>
#include<string.h>
void main (void)
{
int x , a ,z,b,A,c;
int names[], number of seats[], 
destination city[], payment[], info[];
 
FILE *reservations;
first = fopen("reservations.txt","r");
 
printf("Welcome to Airline Reservation System. \n");
printf("******************************************************************\n");
Reply With Quote  
Join Date: May 2006
Posts: 7
Reputation: wwaall2004 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wwaall2004 wwaall2004 is offline Offline
Newbie Poster

Re: plz help(Airline Reservation System)

  #5  
May 10th, 2006
so is it correct up to now?

and how can i proceed?
Reply With Quote  
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation: aniseed is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 5
aniseed's Avatar
aniseed aniseed is offline Offline
Posting Whiz

Re: plz help(Airline Reservation System)

  #6  
May 10th, 2006
It seems to be going in the right direction.

You next step is to identify the functions which can be created, like addReservation(), showReservationDetails() and so on.
Reply With Quote  
Join Date: May 2006
Posts: 7
Reputation: wwaall2004 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wwaall2004 wwaall2004 is offline Offline
Newbie Poster

Re: plz help(Airline Reservation System)

  #7  
May 10th, 2006
i really stuck,



i want you to explain to me in general what shall i do in the program

if u don`t mind

i really want to learn

and i will try to write the program by myself
Reply With Quote  
Join Date: Jul 2005
Posts: 1,099
Reputation: Lerner is a jewel in the rough Lerner is a jewel in the rough Lerner is a jewel in the rough Lerner is a jewel in the rough 
Rep Power: 9
Solved Threads: 143
Lerner Lerner is offline Offline
Veteran Poster

Re: plz help(Airline Reservation System)

  #8  
May 10th, 2006
Well, the directions indicate you need to set up 5 arrays, so that might be one step you could take. This shouldn't be too hard, if you've been paying attention in class and doing the homework to date.

Then you could set up a display menu and declare a variable to hold user input which can then be used as the conditional of a switch statement to trigger calling functions needed to implement a variety of activities listed in then menu.
Reply With Quote  
Join Date: May 2006
Posts: 7
Reputation: wwaall2004 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
wwaall2004 wwaall2004 is offline Offline
Newbie Poster

Re: plz help(Airline Reservation System)

  #9  
May 12th, 2006
how about this at the beginning?

#include <stdio.h>
#include<stdlib.h>
#include<string.h>
int x(char names[], char destination[], char info[], int number_seats[], int payment[]);
void main (void)
{
   int x , a , z, b, A, c;
   char names[50], destination[50], info[50];
   int number_seats[50], payment[10];

   printf("Welcome to Airline Reservation System. \n");
   printf("******************************************************************\n");
   printf("\nplease enter the custumer name\n: ");
   scanf("%c",&names);
   printf("\nHow many seats do you want ?\n");
   scanf("%d",&number_seats);
   printf("\nWhere do you want to go?\n");
   scanf("%c",&destination);
   {
      printf("You must pay << 50 SR.>> for the reservations :\n");
      scanf("%d",&payment[50]);
      while ( payment[10]!=50 )
      {
         printf("\nPlease Enter << 50 SR >> ONLY ! Thank you:");
         scanf("%d",&payment[50]);
      }
   }
}
Last edited by Dave Sinkula : May 12th, 2006 at 10:35 am.
Reply With Quote  
Join Date: Apr 2004
Posts: 3,471
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 16
Solved Threads: 138
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: plz help(Airline Reservation System)

  #10  
May 12th, 2006
I'd recommend backing up a little and first learning how to declare main, how to obtain strings, and how to obtain numbers. An array of size N may be indexed from 0 to N-1.
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 8:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC