Вы находитесь на странице: 1из 21

INDEX

HEADING TOPIC 1: Introduction TOPIC 2: Description of project TOPIC 3: System Requirements TOPIC 3: Program Code TOPIC 4: Testing TOPIC 5: Future Scope Bibliography and References PAGE NO. 4 5 6 7-21 22-24 25 26

INTRODUCTION We had made a Term Paper entitled AIRLINE RESERVATION SYSTEM. This project maintains the record of customers 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 printf("\n ====== MENU====="); ----");

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");

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); printf("\n\nEnter your residence number for any information regarding flight:");

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); printf("\n\n\n\n\apress any key to go back to main menu.....");

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)"); } fclose(fp);

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); printf("\n\nIs seat reserved in Business class(B) or Economy class(E):");

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--------------------------------------------------------"); }

END OF PROGRAM SOURCE CODE

INPUT AND OUTPUT OF THE PROGRAM (TESTING)

FUTURE SCOPE OF THE PROJECT For future scope of this project entitled AIRLINE RESERVATION SYSTEM. Further this can be extended by adding some more features like array using seat arrangement of the customer. It can be more extended by making some more use of file handling. But now this project is at the beginner level of programming. This project can be used to record for the general information of the customer which can be accessed later. The most important future scope of this project is to clear the concept of using control statement and to record the details.

REFRENCES AND BIBLIOGRAPHY BOOKS:


(1)
(2)

PROOGRAMMING IN ANSI C (BALAGUR SAMAY)

LET US C (YASHWANT KANITKAR)

WEBSITES:
(1) (2)

www.google.com www.ask.com

Вам также может понравиться