INDEX
HEADING
PAGE NO.
TOPIC 1: Introduction
4
TOPIC 2: Description of project
5
TOPIC 3: System Requirements
6
TOPIC 3: Program Code
7-21
TOPIC 4: Testing
22-24
TOPIC 5: Future Scope
25
INTRODUCTION
We had made a Term Paper entitled “AIRLINE
RESERVATION SYSTEM”. This project maintains the record
of customer’s detail like name, residence number etc. This
project also saves the data permanently and can be accessed
later and can be modified later. This program provides
convenience to customer by easily booking and cancelling the
seats.
PROGRAM DESCRIPTION
This project “Airline Reservation System” completes all the
requirements of customer. This program intake following
details:
(1)
customer name
(2) phone number
(3)
seat type(business or economy)
(4) reserve seat if it is available
(5) maintain the record of reserved seat customer
And non-reserved customers in separate files which can be
accessed later.
(6) This reservation system gives choice of two Airways
Company i.e. (jet airways and kingfisher airways).
SYSTEM REQUIREMENTS
Compiler (software): Borland c++ (Turbo C++)
Operating system: Win 98/xp/vista
Hard disk requirement: 40 GB (min can be 10 GB)
RAM requirement: 128 mb (min can be 64)
Processor: Intel or AMD (min Celeron processor)
SOURCE CODE
#include<stdio.h> #include<conio.h> int tosb=4,tose=3;
void booking(void); void start(void); void cancel(void); void quit(void); void main() { clrscr(); start(); } void start(void) { int choice; clrscr();
printf("W*E*L*C*O*M*E* *T*O* *A*I*R*L*I*N*E* *R*E*S*E*R*V*A*T*I*O*N* *S*Y*S*T*E*M");
printf("\n\n---\n"); printf("\n ====== MENU=====");
printf("\n ----"); printf("\n\nEnter your CHOICE:"); printf("\n---");
printf("\n\nPress 1 for BOOKING"); printf("\n---");
printf("\n\nPress 2 for CANCELLING TICKET"); printf("\n---");
printf("\n\nPress 3 for EXIT"); printf("\n---\n");
printf("\n\n\n\nEnter your CHOICE:"); scanf("%d",&choice); switch(choice) { case 1: { booking(); } case 2: { cancel(); } case 3: { clrscr(); quit(); delay(3000); exit(); } default: { printf("\n\n\t*****W*R*O*N*G* *C*H*O*I*C*E*******"); getch(); } } } void booking(void) {
int num,ab,nos;
char cha,ch1,name[10]; clrscr();
printf("\n---");
printf("\n\nYou are in the AIRWAYS MENU:");
printf("\n\n1.JET AIRWAYS\n2.KINGFISHER AIRWAYS\n"); printf("\n---");
printf("\n\nEnter your choice:"); scanf("%d",&ab); switch(ab) case 1: { FILE *fp; clrscr(); printf("\n---\n");
printf("**//YOU ARE NOW IN THE MENU OF JET AIRWAYS**//"); printf("\n---");
printf("\n\nWhich class BUSINESS CLASS(B) OR ECONOMY CLASS(E):"); cha=getche();
if(cha=='b'|| cha=='B') {
fp=fopen("booking.txt","w");
fprintf(fp,"\n\nJET AIRWAYS BUSINESS CLASS"); printf("\n\nplease enter your name please:");
scanf("%s",name); fprintf(fp," %2s",name);
printf("\n\nEnter your residence number for any information regarding flight:"); scanf("%d",&num);
fprintf(fp,"%3d",num);
printf("\n\nHow many seats you want to reserve in business class :"); scanf("%d",&nos);
fprintf(fp,"%d",nos); tosb=tosb-nos; if(tosb<nos) {
printf("\n\nSORRY seat is not available"); fprintf(fp,"(NOT RESERVED)");
} else {
printf("\n\n***THANK YOU SEAT IS RESERVED***"); fprintf(fp,"(RESERVED)");
}
fclose(fp);
printf("\n\n\apress any key to go back to main menu..."); getch(); start(); } if(cha=='e'|| cha=='E') { fp=fopen("booking.txt","a");
fprintf(fp,"\n\nJET AIRWAYS ECONOMY CLASS"); printf("\n\n\nplease enter your name:");
scanf("%s",name); fprintf(fp,"%s",name);
scanf("%d",&num); fprintf(fp,"%4d",num);
printf("\n\nHow many seats you want to reserve in economy class:"); scanf("%d",&nos);
fprintf(fp,"%5d",nos); tose=tose-nos;
if(tose<nos) {
printf("\n\nSORRY seat is not available"); fprintf(fp,"(NOT RESERVED)");
} else {
printf("\n\n***THANK YOU SEAT IS RESERVED***"); fprintf(fp,"(RESERVED)");
}
fclose(fp);
printf("\n\nPress any key to go back to main menu..."); getch(); start(); } case 2: { clrscr(); printf("\n---");
printf("\n\n^^NOW YOU ARE IN THE MENU OF KINGFISHER AIRWAYS^^"); printf("\n---");
printf("\n\nWhich class BUSINESS CLASS(B) OR ECONOMY CLASS(E):"); ch1=getche();
if(ch1=='b'|| ch1=='B') {
fp=fopen("booking.txt","a");
fprintf(fp,"\n\nKINGFISHER AIRWAYS BUSINESS CLASS"); printf("\n\nplease enter your name please:");
scanf("%s",name); fprintf(fp,"%s",name);
printf("\n\nEnter your residence number for any information regarding flight:"); scanf("%d",&num);
fprintf(fp,"%d",num);
printf("\n\nHow many seats you want to reserve in business class :"); scanf("%d",&nos);
fprintf(fp,"%d",nos); tosb=tosb-nos; if(tosb<nos) {
printf("\n\n**SORRY SEAT IS NOT AVAILABLE"); fprintf(fp,"(NOT RESERVED)");
} else {
printf("\n\n!!!THANK YOU SEAT IS RESERVED!!!"); fprintf(fp,"(RESERVED)");
}
fclose(fp);
getch(); start(); } if(ch1=='e'|| ch1=='E') { fp=fopen("booking.txt","a");
fprintf(fp,"\n\nKINGFISHER AIRWAYS ECONOMY CLASS"); printf("\n\nplease enter your name please:");
scanf("%s",name); fprintf(fp,"%s",name);
printf("\n\nEnter your residence number for any information regarding flight:"); scanf("%d",&num);
fprintf(fp,"%d",num);
printf("\n\nHow many seats you want to reserve in economy class:"); scanf("%d",&nos);
fprintf(fp,"%d",nos); tose=tose-nos; if(tose<nos) {
printf("\n\nSORRY SEAT IS NOT RESERVED"); fprintf(fp,"(NOT RESERVED)");
} else {
printf("\n\n!!!!THANK YOU SEAT IS RESERVED"); fprintf(fp,"(RESERVED)");
}
printf("\n\n\apress any key to go back to main menu..."); getch(); start(); } } default: { printf("\n\n\n\n\n***W*R*O*N*G* *C*H*O*I*C*E***"); printf("\n\nPress any key to go back to main menu..."); getch(); start(); } } } void cancel(void) { FILE *ca; int c,nosc; char ch,nam[10]; clrscr(); printf("\n---");
printf("\n\nYou are in the SEAT CANCELLING MENU"); printf("\n---");
printf("\n\n\nPLEASE ENTER THE FOLLOWING INFORMATION:"); printf("\n---");
printf("\n\n1.JET AIRWAYS"); printf("\n---");
printf("\n\n2.KINGFISHER AIRWAYS"); printf("\n---");
printf("\n\nEnter Your Choice:"); scanf("%d",&c); switch(c) { case 1: { clrscr(); ca=fopen("cancelling.txt","w"); printf("\n---\n");
printf("You are in the JET AIRWAYS SEAT CANCELLING MENU:"); printf("\n---\n");
printf("\n\nplease enter your name:"); scanf("%s",nam);
fprintf(ca,"s",nam);
printf("\n\n\nIs seat reserved in Business class(B) or Economy class(E):"); ch=getche();
if(ch=='B' || ch=='b') {
fprintf(ca,"JET AIRWAYS BUSINESS CLASS SEAT");
printf("\n\nHow many Business Class seats you want to cancel:"); scanf("%d",nosc);
fprintf(ca,"%d",nosc); fprintf(ca,"(CANCELLED)"); fclose(ca);
printf("\n\n\t\t**SEAT(S) CANCELLED**\n\n\t\t\tTHANKS..."); printf("\n\nPress any key to go back to main menu....");
getch(); start(); } if(ch=='e' || ch=='E') { ca=fopen("cancelling.txt","a");
fprintf(ca,"JET AIRWAYS ECONOMY CLASS SEAT"); printf("\nHow many Economy Class seats you want to cancel:"); scanf("%d",nosc);
fprintf(ca,"%d",nosc); fprintf(ca,"(CANCELLED)"); fclose(ca);
printf("\n\n\t\t**SEAT(S) CANCELLED**\n\nTHANKS..."); printf("\n\nPress any key to go back to main menu..."); getch(); start(); } } case 2: { clrscr(); ca=fopen("cancelling.txt","a"); printf("\n---\n");
printf("\nYou are in the KINGFISHER SEAT CANCELLING MENU:"); printf("\n---\n");
printf("\nplease enter your name:"); scanf("%s",nam);
ch=getche();
if(ch=='b' || ch=='B'); {
fprintf(ca,"KINGFISHER AIRWAYS BUSINESS CLASS SEAT"); printf("\n\n\nHow many Business Class seats you want to cancel:"); scanf("%d",nosc);
fprintf(ca,"(CANCELLED");
printf("\n\n\t\t**SEAT(S) CANCELLED**\n\n\t\t\tTHANKS..."); printf("\n\nPress any key to go back to main menu...");
getch(); start(); }
if(ch=='e' || ch=='E') {
fprintf(ca,"KINGFISHER AIRWAYS ECONOMY CLASS SEAT"); printf("\nHow many Economy Class seats you want to cancel:"); scanf("%d",nosc);
fprintf(ca,"(CANCELLED)"); fclose(ca);
printf("\n\n\t\t**SEAT(S) CANCELLED**\n\n\t\t\t THANKS..."); printf("\n\nPress any key to go back to main menu...");
getch(); start(); } } default : { printf("\n\n*W*R*O*N*G* *C*H*O*I*C*E*");
printf("\n\nPress any key to go back to main menu..."); getch(); start(); } } } void quit(void) { printf("\n\n\n\t\t---\n\n\t\t\tPROGRAMMED BY RAJAN BALANA\n\n\t\t\t\tLovely Professional University\n\n\t\t\t\tB.Tech-MBA(CSE)\n\n\t\t\t\tSection No. 248");
printf("\n\t\t---"); }