•
•
•
•
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
![]() |
•
•
Join Date: May 2006
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
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)
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)
•
•
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation:
Rep Power: 0
Solved Threads: 5
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.
•
•
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation:
Rep Power: 0
Solved Threads: 5
•
•
Join Date: May 2006
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
ok
i will start....
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");•
•
Join Date: Apr 2006
Location: Mumbai, India
Posts: 351
Reputation:
Rep Power: 0
Solved Threads: 5
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.
You next step is to identify the functions which can be created, like addReservation(), showReservationDetails() and so on.
•
•
Join Date: Jul 2005
Posts: 1,099
Reputation:
Rep Power: 9
Solved Threads: 143
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.
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.
•
•
Join Date: May 2006
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Airline Reservation System (ColdFusion)
- HELP - Airline Reservation System - ERD required (Computer Science and Software Design)
Other Threads in the C++ Forum
- Previous Thread: Reading a file into a binary search tree
- Next Thread: parse error, syntax error, wtf error?



Linear Mode