• No results found

Airline Reservation System

N/A
N/A
Protected

Academic year: 2021

Share "Airline Reservation System"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

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

(2)

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.

(3)

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).

(4)

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;

(5)

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

(6)

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) {

(7)

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

(8)

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

(9)

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

(10)

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

(11)

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

}

(12)

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

(13)

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

(14)

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

(15)

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

(16)

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

(17)

INPUT AND OUTPUT OF THE PROGRAM

(TESTING)

(18)
(19)
(20)

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”.

(21)

REFRENCES AND BIBLIOGRAPHY

BOOKS:

(1) PROOGRAMMING IN ANSI C (BALAGUR SAMAY)

(2)

LET US C (YASHWANT KANITKAR)

WEBSITES:

(1)

www.google.com

(2)

www.ask.com

References

Related documents

The PROMs questionnaire used in the national programme, contains several elements; the EQ-5D measure, which forms the basis for all individual procedure

Even if they do, however, enough differences remain in mostly unchar- acterized minor antigens to enable immune cells from the donor and the host to recognize the other as “non-

In Arkansas, as expected based on the details of the school funding formula, most charter schools across the state have lower levels of total spending than their traditional

All of the participants were faculty members, currently working in a higher education setting, teaching adapted physical activity / education courses and, finally, were

If the roll is equal to or higher then the model's shooting skill then it hits and wounds as described in close combat.. If the roll was lower then the model's shooting skill then

The Center for Archaeological Research of The University of Texas at San Antonio conducted a pedestrian cultural resources survey on 3,860 acres ofland at Lackland Air Force Base

Online community: A group of people using social media tools and sites on the Internet OpenID: Is a single sign-on system that allows Internet users to log on to many different.