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

INDEX

1. ACKNOWLEDGEMENT

Pg.2

2. CERTIFICATE

Pg.3

3. DECLARATION
Pg.4
4. INTRODUCTION
5. DATA DICTIONARY
Pg.7
6. OUTPUT SCREENS
Pg.12
7. SOURCE CODE
Pg.21
8. BIBLIOGRAPHY
Pg.149

Pg.5

ACKNOWLEDGEMENT
This project has been a most enlightening,
involving and engaging one for me. The
endeavour would not have materialized without
the guiding light of our teacher, Mrs. Jyoti
Mathur. I would like to take this opportunity to
thank her for her constant support at various
stages during project-making.
Foremost, I thank Rahul and Rajendra, my
partner and friend, who always saw light
through dead ends and made sure we never
gave up. Nothing could truly have been possible
without his never-say-die spirit for it is what led
us through the endless hours of programming
and bug hunting.
I would like to thank my friend () and my dear
brother,Vineet, for testing the program and
helping to fix the bugs.
And I acknowledge the blessings of my parents
without which this task could not have been
accomplished.

Sumeet Mathur

CERTIFICATE
This is to certify that Sumeet Mathur of Class
XII has submitted the project report entitled Air
Ticket Booking Software in partial fulfillment
of Class XII Examination AISSCE 2011-12. This is
a record of the students own work carried out
under my guidance and is hereby approved for
submission.

Mrs. Jyoti Mathur


Head of Department, Computer Science
Delhi Public School, Jodhpur

DECLARATION
I hereby declare that the project entitled Air
Ticket Booking Software is my own work
and has been completed under the guidance of
Mrs. Jyoti Mathur for partial fulfillment of class
XII Examination AISSCE 2011-12.

Sumeet Mathur
Class XII A
Delhi Public School, Jodhpur

INTRODUCTION
This project entitled Air Ticket Booking
Software is aimed at creating a real-time
Air Ticket Booking Interface.
The e-ticket revolution, which has made
flying simpler and reachable to the mass, is
what inspired us to come up with this
project and our main aim was to create
software to provide for hassle free ticket
booking and to create an easy to use
interface.
Features
The Borland Turbo C++, Ver. 3.0 compiler
has been used to develop the code and the
program incorporates the following
features:
Easy-to-use User Interface:
o Menu Driven interface facilitated
by simple keystrokes.
o Simple objective options.
Tutorial- Demo Run:
o Facility of demo-run providing the
user an introduction to the
program and how to access the
various features.
Data Security:
o Independent password system for
each user- passenger details
tamper-proof.
6

o Credit Card details secured from


non-administrator through
password protection.
Flight Table:
o A descriptive, easy to understand
passenger movement table with
detail data record of each flight.
Data File Handling:
o Data records are stored in memory
for future access and can be
transferred to other systems
providing the same platform.
Our aim would only be complete when we
get to serve the real time needs of the
user. And this project remains incomplete
until we get to incorporate the features,
which despite our efforts, may have still
remained.

DATA DICTIONARY
FUNCTIONS

1.
2.
3.
4.
5.
6.
7.

void startup_menu( )
Displays the startup screen. Provides user
with choice of proceeding to the following
operations:
Ticket Booking
Edit Passenger Information
Search
Cancel Ticket
Administrator Reports
Help : Demo Run
Exit
Allows user to move cursor in the menu
and select an operation to pass control to
the respective function.

void book_counter( )
Displays the ticket-booking screen. It
provides user with choice of Origin,
Destination, Date of Departure and
Return, Return/One Way, and Class of
Travel.
Accepts users choice and passes control
to the fare function.

void fare(int orig, int dest, int type, int


trip)
Manipulates users choice of Origin,
Destination, Return/One Way, and Class of
Travel, as passed by the book_counter
function, and calculates the Journey Fare.

Control is then passed to pass_info


function.

void pass_info( )
Displays screen to accept Passenger
Information viz. Name, Contact Address
and Contact Number.
Passes control to pay function.

void pay( )
Displays screen to accept Passengers
Payment via Credit Card. Intakes Credit
Card Information and Transacts with
passengers bank.
Confirms Ticket Booking, provides user
with Unique PNR number and asks for a
password.
Passes control to startup_menu function.

void edit_info( )
Gives user the option to edit passenger
information earlier entered after
validation of PNR number and password.
void search( )
Gives user the option to search passenger
information via tabs:
I. PNR Number
II. First Name
III. Last Name
IV. City
V. Country
VI. Origin
VII. Destination
After searching, if result is positive,
control is passed to display function.
9

void del( )
Gives user the option to Cancel Passenger
Ticket after validation of PNR number and
password.
void report( )
Allows administrator to go through the
following details of passengers after
verification of username and password:
I.
Flight Table
II. Credit Card Details
III. Cancelled Tickets
void help( )
Helps user to have a better understanding
of the program by the following options :
I.
Main Features
II. Demo Run : Tutorial
void about( )
Gives the main features of the program
void display( )
Displays Passenger Particulars.
void bye( )
Displays exit screen and exits from the
program.

10

STRUCTURES
struct info
{
//NAME
char f_name[50];
char l_name[50];
//GENDER & MARITAL STATUS
char ms[8];
char gen[7];
//ADDRESS
char address[75];
char city[30];
char country[30];
//PHONE
char mob[15];
char land[15];
//E-MAIL
char mail[50];
//TICKET
char origin[8];
char dest[8];
//ECONOMY/EXECUTIVE/BUSINESS
char type[10];
//DATE OF JOURNEY
char d_date[15];
//DATE OF RETURN
char r_date[15];
//TIME OF JOURNEY
char timed[11];
char timedland[11];
//TIME OF RETURN
11

char timer[10];
char timerland[10];
//ONE-WAY/RETURN
char trip[8];
//PNR
long int pnr;
char password[21];
//CREDIT CARD
int fare;
char card[15];
char cc_number[20];
char cc_date[10];
char cc_bank[15];
char f_cname[20];
char l_cname[20];
};
It contains data types to handle Passenger
Information entered for ticket booking.
Variable of info structure is pro1

12

OUTPUT SCREENS

13

14

15

16

17

18

19

20

21

SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#include<time.h>
#include<stdlib.h>
#include<string.h>
#include<fstream.h>
#include<ctype.h>
//Function Prototype
void main();
void display();
void book_counter();
void pass_info();
void fare(int, int, int, int);
void pay(char, char);
void edit_info();
void startup_menu();
void del();
void search();
void report();
void rep_delmum(int);
void rep_delkol(int);
void rep_deljod(int);
void rep_mumdel(int);
void rep_mumkol(int);
void rep_mumjod(int);
void rep_koldel(int);
void rep_kolmum(int);
void rep_koljod(int);
void rep_joddel(int);
void rep_jodmum(int);
void rep_jodkol(int);
void report_menu();
void report_flt();
void demo();
void tbdemo();
void epidemo();
void sdemo();
void ctdemo();
void help();
void about();
void ij();
void bye();

22

//STRUCTURES
struct info
{
//NAME
char f_name[50];
char l_name[50];
//GENDER & MARITAL STATUS
char ms[8];
char gen[7];
//ADDRESS
char address[75];
char city[30];
char country[30];
//PHONE
char mob[15];
char land[15];
//E-MAIL
char mail[50];
//TICKET
char origin[8];
char dest[8];
//ECONOMY/EXECUTIVE/BUSINESS
char type[10];
//DATE OF JOURNEY
char d_date[15];
//DATE OF RETURN
char r_date[15];
//TIME OF JOURNEY
char timed[11];
char timedland[11];
//TIME OF RETURN
char timer[10];
char timerland[10];
//ONE-WAY/RETURN
char trip[8];
//PNR
long int pnr;
char password[21];
23

//CREDIT CARD
int fare;
char card[15];
char cc_number[20];
char cc_date[10];
char cc_bank[15];
char f_cname[20];
char l_cname[20];
};
info pro1;
//PASSENGER INFO
void pass_info()
{
clrscr();
int x, y;
cout<<"\n\t\t\tPASSENGER INFORMATION";
cout<<"\n\t\t\t---------------------";
cout<<"\n\n\n\t*Enter First Name : ";
x=wherex();
y=wherey();
f:
gets(pro1.f_name);
if(pro1.f_name[0]=='\0')
{
gotoxy(x,y);
goto f;
}
pro1.f_name[0]=toupper(pro1.f_name[0]);
cout<<"\n\n\t*Enter Last Name : ";
x=wherex();
y=wherey();
l:
gets(pro1.l_name);
if(pro1.l_name[0]=='\0')
{
gotoxy(x,y);
goto l;
}
pro1.l_name[0]=toupper(pro1.l_name[0]);
char gen;
cout<<"\n\n\t*Enter Gender (M-Male, F-Female) : ";
x=wherex();
y=wherey();
24

g:
cin>>gen;
if(gen=='\0')
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto g;
}
if((gen!='m') && (gen!='M') && (gen!='f') && (gen!='F'))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto g;
}
if(gen=='M'||gen=='m')
strcpy(pro1.gen, "Male");
else if(gen=='F'||gen=='f')
strcpy(pro1.gen, "Female");
char ms;
cout<<"\n\n\t*Married (Y/N) ? : ";
x=wherex();
y=wherey();
ms:
cin>>ms;
if(pro1.ms=='\0')
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto ms;
}
if((ms!='y') && (ms!='Y') && (ms!='n') && (ms!='N'))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto ms;
}
if(ms=='Y'||ms=='y')
strcpy(pro1.ms, "Married");
else if(ms=='N'||ms=='n')
strcpy(pro1.ms, "Single");
cout<<"\n\n\n\t\t\tCONTACT ADDRESS";
cout<<"\n\t\t\t----------------";
cout<<"\n\n\n\t*Enter Address : ";
25

x=wherex();
y=wherey();
add:
gets(pro1.address);
if(pro1.address[0]=='\0')
{
gotoxy(x,y);
goto add;
}
cout<<"\n\n\t*Enter City : ";
x=wherex();
y=wherey();
cit:
gets(pro1.city);
if(pro1.city[0]=='\0')
{
gotoxy(x,y);
goto cit;
}
pro1.city[0]=toupper(pro1.city[0]);
cout<<"\n\n\t*Enter Country : ";
x=wherex();
y=wherey();
coun:
gets(pro1.country);
if(pro1.country[0]=='\0')
{
gotoxy(x,y);
goto coun;
}
pro1.country[0]=toupper(pro1.country[0]);
cout<<"\n\n\n\t\t\tCONTACT NUMBER";
cout<<"\n\t\t\t--------------";
cout<<"\n\n\n\tEnter Mobile Number(add country code) : +";
gets(pro1.mob);
cout<<"\n\n\t*Enter Fixed Line Number(add country and city
code) : +";
x=wherex();
y=wherey();
la:
gets(pro1.land);
if(pro1.land[0]=='\0')
{
gotoxy(x,y-1);
goto la;
}
26

cout<<"\n\n\tEnter Your E-Mail Address :\n\t\t\t\t";


gets(pro1.mail);
cout<<"\n\n\n\n\t\t\tPress Any Key To Continue...";
getch();
pay(gen, ms);
}
//BOOKING COUNTER
`
void book_counter()
{
ij();
int choice, x, y;
cout<<"\n\t\t\tE-TICKET BOOKING COUNTER";
cout<<"\n\t\t\t------------------------";
cout<<"\n\n\t\t\t\tSELECT ROUTE";
cout<<"\n\t\t\t\t------------";
//ROUTE
int orig;
cout<<"\n\n\n\t\tOrigin :\n\t\t1. MUMBAI\n\t\t2. DELHI\n\t\t3.
KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
x=wherex();
y=wherey();
or:
cin>>orig;
if((orig>4) || (orig<1))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto or;
}
if(orig==1)
strcpy(pro1.origin,"MUMBAI");
else if(orig==2)
strcpy(pro1.origin, "DELHI");
else if(orig==3)
strcpy(pro1.origin, "KOLKATA");
else if(orig==4)
strcpy(pro1.origin, "JODHPUR");
int dest;
cout<<"\n\n\t\tDestination :\n\t\t1. MUMBAI\n\t\t2.
DELHI\n\t\t3. KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
x=wherex();
y=wherey();
de:
cin>>dest;
if(orig==dest)
27

{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto de;
}
if((dest>4) || (dest<1))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto de;
}
if(dest==1)
strcpy(pro1.dest,"MUMBAI");
else if(dest==2)
strcpy(pro1.dest, "DELHI");
else if(dest==3)
strcpy(pro1.dest, "KOLKATA");
else if(dest==4)
strcpy(pro1.dest, "JODHPUR");
//TIME OF JOURNEY
if(orig==1 && dest==2)
{
strcpy(pro1.timed, "1830 hours");
strcpy(pro1.timedland, "1950 hours");
}
else if(orig==2 && dest==1)
{
strcpy(pro1.timed, "2300 hours");
strcpy(pro1.timedland, "0020 hours");
}
else if(orig==1 && dest==3)
{
strcpy(pro1.timed, "1900 hours");
strcpy(pro1.timedland, "2100 hours");
}
else if(orig==3 && dest==1)
{
strcpy(pro1.timed, "1650 hours");
strcpy(pro1.timedland, "1850 hours");
}
else if(orig==1 && dest==4)
{
strcpy(pro1.timed, "1730 hours");
strcpy(pro1.timedland, "1815 hours");
}
else if(orig==4 && dest==1)
{
strcpy(pro1.timed, "1100 hours");
28

strcpy(pro1.timedland, "1145 hours");


}
else if(orig==2 && dest==3)
{
strcpy(pro1.timed, "1400 hours");
strcpy(pro1.timedland, "1550 hours");
}
else if(orig==3 && dest==2)
{
strcpy(pro1.timed, "0900 hours");
strcpy(pro1.timedland, "1050 hours");
}
else if(orig==2 && dest==4)
{
strcpy(pro1.timed, "0700 hours");
strcpy(pro1.timedland, "0750 hours");
}
else if(orig==4 && dest==2)
{
strcpy(pro1.timed, "1215 hours");
strcpy(pro1.timedland, "1305 hours");
}
else if(orig==3 && dest==4)
{
strcpy(pro1.timed, "0600 hours");
strcpy(pro1.timedland, "0750 hours");
}
else if(orig==4 && dest==3)
{
strcpy(pro1.timed, "0200 hours");
strcpy(pro1.timedland, "0350 hours");
}
//DATE OF JOURNEY
cout<<"\n\n\t\tAvailable Dates for Journey :";
cout<<"\n\n\t\t\t 1. 05 / 02 / 2009";
cout<<"\n\n\t\t\t 2. 03 / 03 / 2009";
cout<<"\n\n\t\t\t 3. 11 / 04 / 2009";
cout<<"\n\n\t\tTime of\n\t\tDeparture :
"<<pro1.timed<<"\n\t\tArrival : "<<pro1.timedland;
char ch;
int c;
cout<<"\n\n\tDo you want to fly on available dates [Y/N] ? ";
x=wherex();
y=wherey();
dd:
cin>>ch;
if(ch=='y' || ch=='Y')
{
cout<<"\n\t\t\tENTER CHOICE : ";
x=wherex();
29

y=wherey();
dated:
cin>>c;
if(c==1)
{
strcpy(pro1.d_date,"05
}
else if(c==2)
{
strcpy(pro1.d_date,"03
}
else if(c==3)
{
strcpy(pro1.d_date,"11
}
else
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto dated;
}
cout<<"\n\t\tDate of Journey

/ 02 / 2009");

/ 03 / 2009");

/ 04 / 2009");

: "<<pro1.d_date;

}
else if(ch=='n' || ch=='N')
{
cout<<"\n\n\tReturning to main menu.\n\tPress any key
to continue...";
getch();
startup_menu();
}
else
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto dd;
}
//ONE WAY?
int trip;
cout<<"\n\t\tTrip :\n\t\t1. One Way\n\t\t2. Return\n\t\t\tENTER
CHOICE : ";
x=wherex();
y=wherey();
t:
cin>>trip;
if(trip>2 || trip<1)
{
gotoxy(x,y-1);
cout<<' ';
30

gotoxy(x,y-1);
goto t;
}
if(trip==1)
strcpy(pro1.trip, "One Way");
else if(trip==2)
strcpy(pro1.trip, "Return");
if(trip==2)
{
//TIME OF RETURN
if(orig==1 && dest==2)
{
strcpy(pro1.timed, "2300 hours");
strcpy(pro1.timedland, "0020 hours");
}
else if(orig==2 && dest==1)
{
strcpy(pro1.timed, "1830 hours");
strcpy(pro1.timedland, "1950 hours");
}
else if(orig==1 && dest==3)
{
strcpy(pro1.timed, "1650 hours");
strcpy(pro1.timedland, "1850 hours");
}
else if(orig==3 && dest==1)
{
strcpy(pro1.timed, "1900 hours");
strcpy(pro1.timedland, "2100 hours");
}
else if(orig==1 && dest==4)
{
strcpy(pro1.timed, "1100 hours");
strcpy(pro1.timedland, "1145 hours");
}
else if(orig==4 && dest==1)
{
strcpy(pro1.timed, "1730 hours");
strcpy(pro1.timedland, "1815 hours");
}
else if(orig==2 && dest==3)
{
strcpy(pro1.timed, "0900 hours");
strcpy(pro1.timedland, "1050 hours");
}
else if(orig==3 && dest==2)
{
strcpy(pro1.timed, "1400 hours");
strcpy(pro1.timedland, "1550 hours");
31

}
else if(orig==2 && dest==4)
{
strcpy(pro1.timed, "1215 hours");
strcpy(pro1.timedland, "1305 hours");
}
else if(orig==4 && dest==2)
{
strcpy(pro1.timed, "0700 hours");
strcpy(pro1.timedland, "0750 hours");
}
else if(orig==3 && dest==4)
{
strcpy(pro1.timed, "0200 hours");
strcpy(pro1.timedland, "0350 hours");
}
else if(orig==4 && dest==3)
{
strcpy(pro1.timed, "0600 hours");
strcpy(pro1.timedland, "0750 hours");
}
//DATE OF RETURN
cout<<"\n\n\t\tAvailable Dates for Return Journey :";
cout<<"\n\n\t\t\t 1. 06 / 02 / 2009";
cout<<"\n\n\t\t\t 2. 05 / 03 / 2009";
cout<<"\n\n\t\t\t 3. 14 / 04 / 2009";
cout<<"\n\n\t\tTime of\n\t\tDeparture :
"<<pro1.timer<<"\n\t\tArrival : "<<pro1.timerland;
cout<<"\n\n\tEnter 'Y' to fly on available dates,\n\t'N' to
cancel booking ticket,\n\tand 'O' to opt for a 'ONE WAY' ticket...";
x=wherex();
y=wherey();
dr:
cin>>ch;
if(ch=='y' || ch=='Y')
{
cout<<"\n\t\t\tENTER CHOICE : ";
x=wherex();
y=wherey();
dater:
cin>>c;
if(c==1)
{
strcpy(pro1.r_date,"06 / 02 / 2009");
}
else if(c==2)
{
strcpy(pro1.d_date,"06 / 03 / 2009");
}
else if(c==3)
32

{
strcpy(pro1.d_date,"14 / 04 / 2009");
}
else
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto dater;
}
}
else if(ch=='n' || ch=='N')
{
cout<<"\n\n\tReturning to main menu.\n\tPress
any key to continue...";
getch();
startup_menu();
}
else if(ch=='o' || ch=='O')
{
trip=1;
strcpy(pro1.trip, "One Way");
goto typ;
}
else
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto dr;
}
cout<<"\n\t\tDate of Return Journey : "<<pro1.r_date;
}
//CLASS
typ:
int type;
cout<<"\n\t\tType :\n\t\t1. Economy Class\n\t\t2. Executive
Class\n\t\t3. Business Class\n\t\t\tENTER CHOICE : ";
x=wherex();
y=wherey();
z:
cin>>type;
if(type>3 || type<1)
{
gotoxy(x,y-1);
cout<<' ';
gotoxy(x,y-1);
goto z;
}
if(type==1)
33

strcpy(pro1.type, "Economy");
else if(type==2)
strcpy(pro1.type, "Executive");
else if(type==3)
strcpy(pro1.type, "Business");
fare(orig, dest, trip, type);
}
//FARE
void fare(int orig, int dest, int trip, int type)
{
ij();
//BOMBAY-DELHI
if((orig==1 || orig==2) && (dest==2 || dest==1) &&
type==1)
{
pro1.fare=6225;
if(trip==2)
pro1.fare*=2;
}
else if((orig==1 || orig==2) && (dest==1 || dest==2) &&
type==2)
{
pro1.fare=7425;
if(trip==2)
pro1.fare*=2;
}
else if((orig==1 || orig==2) && (dest==1 || dest==2) &&
type==3)
{
pro1.fare=9835;
if(trip==2)
pro1.fare*=2;
}
//BOMBAY-KOLKATA
if((orig==1 || orig==3) && (dest==3 || dest==1) &&
type==1)
{
pro1.fare=10225;
if(trip==2)
pro1.fare*=2;
}
else if((orig==1 || orig==3) && (dest==3 || dest==1) &&
type==2)
{
pro1.fare=12225;
if(trip==2)
pro1.fare*=2;
}
34

else if((orig==1 || orig==3) && (dest==3 || dest==1) &&


type==3)
{
pro1.fare=15225;
if(trip==2)
pro1.fare*=2;
}
//BOMBAY-JODHPUR
if((orig==1 || orig==4) && (dest==4 || dest==1) &&
type==1)
{
pro1.fare=4225;
if(trip==2)
pro1.fare*=2;
}
else if((orig==1 || orig==4) && (dest==4 || dest==1) &&
type==2)
{
pro1.fare=5435;
if(trip==2)
pro1.fare*=2;
}
else if((orig==1 || orig==4) && (dest==4 || dest==1) &&
type==3)
{
pro1.fare=7855;
if(trip==2)
pro1.fare*=2;
}
//DELHI-KOLKATA
if((orig==2 || orig==3) && (dest==3 || dest==2) &&
type==1)
{
pro1.fare=6665;
if(trip==2)
pro1.fare*=2;
}
else if((orig==2 || orig==3) && (dest==3 || dest==2) &&
type==2)
{
pro1.fare=8445;
if(trip==2)
pro1.fare*=2;
}
else if((orig==2 || orig==3) && (dest==3 || dest==2) &&
type==3)
{
pro1.fare=11575;
if(trip==2)
35

pro1.fare*=2;
}
//DELHI-JODHPUR
if((orig==2 || orig==4) && (dest==4 || dest==2) &&
type==1)
{
pro1.fare=6665;
if(trip==2)
pro1.fare*=2;
}
else if((orig==2 || orig==4) && (dest==4 || dest==2) &&
type==2)
{
pro1.fare=8445;
if(trip==2)
pro1.fare*=2;
}
else if((orig==2 || orig==4) && (dest==4 || dest==2) &&
type==3)
{
pro1.fare=11575;
if(trip==2)
pro1.fare*=2;
}
//KOLKATA-JODHPUR
if((orig==3 || orig==4) && (dest==4 || dest==3) &&
type==1)
{
pro1.fare=9925;
if(trip==2)
pro1.fare*=2;
}
else if((orig==3 || orig==4) && (dest==4 || dest==3) &&
type==2)
{
pro1.fare=12445;
if(trip==2)
pro1.fare*=2;
}
else if((orig==3 || orig==4) && (dest==4 || dest==3) &&
type==3)
{
pro1.fare=14575;
if(trip==2)
pro1.fare*=2;
}
cout<<"\nFare @ ";
if(type==1)
36

{
cout<<"ECONOMY CLASS";
}
else if(type==2)
{
cout<<"EXECUTIVE CLASS";
}
else if(type==3)
{
cout<<"BUSINESS CLASS";
}
cout<<" is INR "<<pro1.fare;
cout<<"\n\n\t\tPress Any Key To Proceed To Fill In Passenger
Details...";
getch();
pass_info();
}
//PAY FUNCTION
void pay(char gen, char ms)
{
ij();
int x, y;
cout<<"\n\t\t\t\tPAYMENT COUNTER";
cout<<"\n\t\t\t\t---------------\n\n\t";
if(gen=='m'||gen=='M')
cout<<"Dear Mr. ";
else
{
if(ms=='y'|| ms=='Y')
cout<<"Dear Mrs. ";
else
cout<<"Dear Ms. ";
}
cout<<pro1.f_name<<' '<<pro1.l_name<<",\n\tyou can pay
your fare of INR "<<pro1.fare<<" by using your credit card.";
cout<<"\n\n\n\t\tCREDIT CARD DETAILS";
cout<<"\n\t\t-------------------";
//CARD TYPE
cout<<"\n\n\t\tCARD TYPE: ";
int card_choice;
cout<<"\n\n\t\t1. VISA \n\t\t2. American Express \n\t\t3. Diners
Club \n\t\t4. Mastercard \n\t\t5. JCB";
cout<<"\n\n\t\tEnter Choice : ";
x=wherex();
y=wherey();
card:
37

cin>>card_choice;
char j2me;
switch(card_choice)
{
case 1 :strcpy(pro1.card,
break;
case 2 :strcpy(pro1.card,
break;
case 3 :strcpy(pro1.card,
break;
case 4 :strcpy(pro1.card,
break;
case 5 :strcpy(pro1.card,
break;
default:gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto card;
}

"VISA");
"American Express");
"Diners Club");
"Mastercard");
"JCB");

cout<<"\n\n\n\n\tEnter First Name as on Card : ";


x=wherex();
y=wherey();
fc:
gets(pro1.f_cname);
if(pro1.f_cname[0]=='\0')
{
gotoxy(x,y);
goto fc;
}
pro1.f_cname[0]=toupper(pro1.f_cname[0]);
cout<<"\n\n\tEnter Last Name as on Card : ";
x=wherex();
y=wherey();
lc:
gets(pro1.l_cname);
if(pro1.l_cname[0]=='\0')
{
gotoxy(x,y);
goto lc;
}
pro1.l_cname[0]=toupper(pro1.l_cname[0]);
cout<<"\n\n\tEnter Credit Card Number : ";
x=wherex();
y=wherey();
cc:
gets(pro1.cc_number);
if(pro1.cc_number[0]=='\0')
{
38

gotoxy(x,y);
goto cc;
}
cout<<"\n\n\tEnter Expiry Date(DD / MM / YYYY) : ";
x=wherex();
y=wherey();
ed:
gets(pro1.cc_date);
if(pro1.cc_date[0]=='\0')
{
gotoxy(x,y);
goto ed;
}
cout<<"\n\n\tEnter Issuing Bank : ";
x=wherex();
y=wherey();
cb:
gets(pro1.cc_bank);
if(pro1.cc_bank[0]=='\0')
{
gotoxy(x,y);
goto cb;
}
char pur;
cout<<"\n\n\n\tAre You Sure You Want To Purchase The Ticket
(Y/N) ? ";
x=wherex();
y=wherey();
p:
cin>>pur;
if((pur!='y') && (pur!='Y') && (pur!='n') && (pur!='N'))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto p;
}
if((pur=='n') || (pur=='N'))
{
cout<<"\n\nThe Entry was Deleted Successfully...... ";
cout<<"\n\nPRESS ANY KEY TO CONTINUE....";
cout<<"\n\n\t\tReturning to Payment Counter....";
getch();
startup_menu();
}
cout<<"\n\n\n\n\tPlease Wait While Server Connects With
"<<pro1.cc_bank<<" Server...";
delay(1000);
39

cout<<"...";
delay(800);
cout<<"...";
cout<<"\n\n\n\tExecuting Your Transaction....Please Wait..";
delay(800);
cout<<"...";
delay(800);
cout<<"...";
cout<<"\n\n\n\n\t\tTRANSACTION COMPLETED
SUCCESSFULLY";
cout<<"\n\n\n\n\n\t\tPress Any Key To Proceed...";
getch();
clrscr();
randomize();
cout<<"\n\n\n\n\nTHIS DATA IS SENSITIVE AND WILL BE USED
FOR FUTURE REFERENCES";
cout<<"\n\n-------------------------------------------------------------";
long int q;
q=random(199928);
a:
cout<<"\n\n\nYour PNR Number is : "<<q;
cout<<"\n\nEnter The PNR Number As Seen Above for
confirmation : ";
cin>>pro1.pnr;
if(q!=pro1.pnr)
{
cout<<"\n\n\tPNR Number does not match...Try
again!!!";
goto a;
}
char ch;
int i;
e:
cout<<"\n\nEnter passsword(SPACES NOT ALLOWED) : ";
for(i=0;i<=20;i++)
{
x=wherex();
y=wherey();
ch=getch();
if(ch==8)
{
if(i==0)
{
gotoxy(x,y);
i--;
continue;
}
x=x-1;
gotoxy(x,y);
cout<<' ';
40

pro1.password[i-1]='\0';
gotoxy(x,y);
i=i-2;
}
else if(ch==13)
{
pro1.password[i]='\0';
break;
}
else if(ch==32)
{
cout<<"\n\nSpaces not allowed...";
goto e;
}
else
{
cout<<'*';
pro1.password[i]=ch;
}
if(i==20)
{
cout<<"\n\nPassword cannot exceed 20
characters...";
goto e;
}
}
if(pro1.password[0]=='\0')
{
cout<<"\n\nCompulsory Field...";
goto e;
}
ofstream fout;
fout.open("air_pass.dat", ios::app|ios::binary);
fout.write((char*)&pro1,sizeof(pro1));
fout.close();
clrscr();
cout<<"\n\n\n\t\tThank You For Choosing To Fly With INDIAN
JETLINES...";
cout<<"\n\n\t\tHoping To Serve You On-Board....";
cout<<"\n\n\t\t\tWish You Happy Flying...";
cout<<"\n\n\n\t\t\tEnter Any Key To Return To Startup
Menu...";
getch();
startup_menu();
}
// MODIFY / EDIT
void edit_info()
{
41

ifstream fin;
int x1,y1,x2,y2,x3,y3,x4,y4,x5,y5;
fin.open("air_pass.dat",ios::binary||ios::in);
if(!fin)
{
ij();
cout<<"\n\t\t\tWELCOME TO EDIT PASSENGER DETAILS
MENU";
cout<<"\n\t\t\t--------------------------------------";
cout<<"\n\n\t\tNo Entries....!!!";
cout<<"\n\n\t\tPRESS ANY KEY TO CONTINUE....";
fin.close();
getch();
startup_menu();
}
edd:
char ch, pass[21], fname[50], lname[50], add[75], mobile[15],
landline[15], con[30], email[50], city[30];
ij();
cout<<"\n\t\t\tWELCOME TO EDIT PASSENGER DETAILS
MENU";
cout<<"\n\t\t\t--------------------------------------";
long int p;
int i, x, y;
cout<<"\n\n\n\tEnter Your PNR Number : ";
cin>>p;
pw:
cout<<"\n\n\tEnter passsword(Spaces not allowed) : ";
for(i=0;i<=20;i++)
{
x=wherex();
y=wherey();
ch=getch();
if(ch==8)
{
if(i==0)
{
gotoxy(x,y);
i--;
continue;
}
x=x-1;
gotoxy(x,y);
cout<<' ';
pass[i-1]='\0';
gotoxy(x,y);
i=i-2;
42

}
else if(ch==13)
{
pass[i]='\0';
break;
}
else if(ch==32)
{
cout<<"\nSpaces not allowed...";
goto pw;
}
else
{
cout<<'*';
pass[i]=ch;
}
if(i==20)
{
cout<<"\nPassword cannot exceed 20
characters...";
goto pw;
}
}
if(pass[0]=='\0')
{
cout<<"\n\nCompulsory Field...";
goto pw;
}
int choice, temp=0;
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((pro1.pnr==p) && (strcmp(pass,pro1.password)==0))
{
temp=1;
break;
}
}
if(temp==0)
{
cout<<"\n\nMatch Not Found.....!!";
cout<<"\n\nPress ENTER to try again and\n ESC to
return to Mai Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
43

goto edd;
else if(ch==27)
startup_menu();
else
{
gotoxy(x,y);
goto ee;
}
}
ofstream fout;
fout.open("temp.dat",ios::binary||ios::app);
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(p!=pro1.pnr)
fout.write((char*)&pro1, sizeof(pro1));
else
{
a:
ij();
*fname=*lname=*mobile=*landline=*add=*city=*con='\0';
gotoxy(17,10);
cout<<"EDIT PASSENGER DETAILS MENU";
gotoxy(17,11);
cout<<"---------------------------\n";
if(strcmpi(pro1.gen, "Male")==0)
cout<<"\n\tDear Mr. ";
else
{
if(strcmpi(pro1.ms, "Married")==0)
cout<<"\n\tDear Mrs. ";
else
cout<<"\n\tDear Ms. ";
}
cout<<pro1.f_name<<' '<<pro1.l_name;
cout<<",\n\tWhich Field Do You Want To
Change?";
cout<<"\n\n\n\t\t1. NAME : ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. CONTACT NUMBER : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. CONTACT ADDRESS : ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t\t4. GENDER & MARITAL STATUS : ";
x4=wherex();
y4=wherey();
44

cout<<"\n\n\t\t5. RETURN TO MAIN MENU : ";


x5=wherex();
y5=wherey();
gotoxy(1,44);
cout<<"-----------------------------------------------------------------------\n";
cout<<"\nPress <SPACEBAR>
To Move To
Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To
Previous Tab";
cout<<"\nPress <ENTER>
To Select";
nam:
gotoxy(x1,y1);
choice=getch();
if(choice==13)
{
ij();
gotoxy(19,10);
cout<<"EDIT NAME";
gotoxy(19,11);
cout<<"---------";
cout<<"\n\n\tTo skip, Press ENTER";
cout<<"\n\n\t\tOriginal First Name : ";
puts(pro1.f_name);
cout<<"\n\t\tEnter New First Name : ";
gets(fname);
if(*fname!='\0')
strcpy(pro1.f_name,fname);
pro1.f_name[0]=toupper(pro1.f_name[0]);
cout<<"\n\t\tNew First Name : ";
puts(pro1.f_name);
cout<<"\n\n\t\tOriginal Last Name : ";
puts(pro1.l_name);
cout<<"\n\t\tEnter New Last Name : ";
gets(lname);
if(*lname!='\0')
strcpy(pro1.l_name,lname);
pro1.l_name[0]=toupper(pro1.l_name[0]);
cout<<"\n\t\tNew Last Name : ";
puts(pro1.l_name);
fout.write((char*)&pro1, sizeof(pro1));
fin.close();
fout.close();
remove("air_pass.dat");
rename("temp.dat", "air_pass.dat");
cout<<"\n\n\n\tPress Any Key to Return to
Previous Menu...";
getch();
45

goto a;
}
else if(choice==32)
{
cn:
gotoxy(x2,y2);
choice=getch();
if(choice==13)
{
ij();
gotoxy(19,10);
cout<<"EDIT CONTACT NUMBER";
gotoxy(19,11);
cout<<"---------";
cout<<"\n\n\tTo skip, Press ENTER";
cout<<"\n\n\t\tOriginal Mobile Number
: +";
puts(pro1.mob);
cout<<"\n\t\tEnter New Mobile
Number : +";
gets(mobile);
if(*mobile!='\0')
strcpy(pro1.mob,mobile);
cout<<"\n\t\tNew Mobile Number : +";
puts(pro1.mob);
cout<<"\n\n\t\tOriginal Landline
Number : +";
puts(pro1.land);
cout<<"\n\t\tEnter New Landline
Number : +";
gets(landline);
if(*landline!='\0')
strcpy(pro1.land,landline);
cout<<"\n\t\tNew Landline Number :
+";
puts(pro1.land);
cout<<"\n\n\t\tOriginal E-Mail Address
: ";
puts(pro1.mail);
cout<<"\n\t\tEnter New E-Mail
Address : ";
gets(email);
if(*email!='\0')
strcpy(pro1.mail,email);
cout<<"\n\t\tNew E-Mail Address : ";
puts(pro1.mail);
fout.write((char*)&pro1, sizeof(pro1));
fin.close();
46

fout.close();
remove("air_pass.dat");
rename("temp.dat", "air_pass.dat");
cout<<"\n\n\n\tPress Any Key to
Return to Previous Menu...";
getch();
goto a;
}
else if(choice==32)
{
ca:
gotoxy(x3,y3);
choice=getch();
if(choice==13)
{
ij();
gotoxy(19,10);
cout<<"EDIT CONTACT
ADDRESS";
gotoxy(19,11);
cout<<"--------------------";
cout<<"\n\n\tTo skip, Press
ENTER";
cout<<"\n\n\t\tOriginal
Address : ";
puts(pro1.address);
cout<<"\n\t\tEnter New
Address : ";
gets(add);
if(*add!='\0')
strcpy(pro1.address,add);
cout<<"\n\t\tNew Address : ";
puts(pro1.address);
cout<<"\n\n\t\tOriginal City : ";
puts(pro1.city);
cout<<"\n\t\tEnter New City : ";
gets(city);
if(*city!='\0')
strcpy(pro1.city,city);
pro1.city[0]=toupper(pro1.city[0]);
cout<<"\n\t\tNew City : ";
puts(pro1.city);
cout<<"\n\n\t\tOriginal Country :
";
puts(pro1.country);
47

cout<<"\n\t\tEnter New
Country : ";
gets(con);
if(*con!='\0')
strcpy(pro1.country,con);
pro1.country[0]=toupper(pro1.country[0]);
cout<<"\n\t\tNew Country : ";
puts(pro1.country);
fout.write((char*)&pro1,
sizeof(pro1));
fin.close();
fout.close();
remove("air_pass.dat");
rename("temp.dat",
"air_pass.dat");
cout<<"\n\n\n\tPress Any Key to
Return to Previous Menu...";
getch();
goto a;
}
else if(choice==32)
{
gm:
gotoxy(x4,y4);
choice=getch();
if(choice==13)
{
ij();
gotoxy(19,10);
cout<<"GENDER &
MARITAL STATUS";
gotoxy(19,11);
cout<<"-----------------------";
cout<<"\n\n\t\t";
char gen;
cout<<"GENDER (M-Male,
F-Female)\n";
cout<<"\n\t\t*Enter
Gender : ";
x=wherex();
y=wherey();
g:
cin>>gen;
if(gen=='\0')
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto g;
}
48

if((gen!='m') && (gen!


='M') && (gen!='f') && (gen!='F'))
{
gotoxy(x,y-1);
cout<<' ';
gotoxy(x,y-1);
goto g;
}
if(gen=='M'||gen=='m')
strcpy(pro1.gen,
"Male");
else if(gen=='F'||gen=='f')
strcpy(pro1.gen,
"Female");
char ms;
cout<<"\n\n\t\tMARRIED
(Y-Married, N-Single)\n";
cout<<"\n\t\t*Married
(Y/N) ? : ";
x=wherex();
y=wherey();
ms:
cin>>ms;
if(ms=='\0')
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto ms;
}
if((ms!='y') && (ms!='Y')
&& (ms!='n') && (ms!='N'))
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto ms;
}
if(ms=='Y'||ms=='y')
strcpy(pro1.ms,
"Married");
else if(ms=='N'||ms=='n')
strcpy(pro1.ms,
"Single");
fout.write((char*)&pro1,
sizeof(pro1));
fin.close();
49

fout.close();
remove("air_pass.dat");
rename("temp.dat",
"air_pass.dat");
cout<<"\n\n\n\tPress Any
Key to Return to Previous Menu...";
getch();
goto a;
}
else if(choice==32)
{
e:
gotoxy(x5,y5);
choice=getch();
if(choice==13)
startup_menu();
else if(choice==8)
goto gm;
else
goto e;
}
else if(choice==8)
goto ca;
else
goto gm;
}
else if(choice==8)
goto cn;
else
goto ca;
}
else if(choice==8)
goto nam;
else
goto cn;
}
else
goto nam;
}
}
}
//CANCEL TICKET
DELETE FUNCTION
void del()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
if(!fin)
{
fin.close();
50

ij();
cout<<"\n\t\t\tWELCOME TO TICKET CANCELLATION
MENU";
cout<<"\n\t\t\t-----------------------------------";
cout<<"\n\n\t\tNo Entries....!!!";
cout<<"\n\n\t\tPRESS ANY KEY TO CONTINUE....";
getch();
startup_menu();
}
ofstream fout;
fout.open("temp.dat", ios::binary|ios::app);
a:
long int p;
int i, x, y, no, temp=0;
char choice, ch, pass[21];
ij();
cout<<"\n\t\t\tWELCOME TO TICKET CANCELLATION MENU";
cout<<"\n\t\t\t-----------------------------------";
cout<<"\n\n\t\tEnter the PNR No. : ";
cin>>p;
e:
cout<<"\n\n\t\tEnter passsword(SPACES NOT ALLOWED) : ";
for(i=0;i<=20;i++)
{
x=wherex();
y=wherey();
ch=getch();
if(ch==8)
{
if(i==0)
{
gotoxy(x,y);
i--;
continue;
}
x=x-1;
gotoxy(x,y);
cout<<' ';
pass[i-1]='\0';
gotoxy(x,y);
i=i-2;
}
else if(ch==13)
{
pass[i]='\0';
break;
}
else if(ch==32)
51

{
cout<<"\nSpaces not allowed...";
goto e;
}
else
{
cout<<'*';
pass[i]=ch;
}
if(i==20)
{
cout<<"\nPassword cannot exceed 20
characters...";
goto e;
}
}
if(pass[0]=='\0')
{
cout<<"\n\nCompulsory Field...";
goto e;
}
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pass, pro1.password)==0) &&
(pro1.pnr==p))
{
temp=1;
break;
}
}
if(temp==0)
{
cout<<"\n\nPassword and PNR No. do not match......!!!";
cout<<"\n\nPress ENTER to try again and\n ESC to
return to Main Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
goto a;
else if(ch==27)
startup_menu();
else
{
gotoxy(x,y);
52

goto ee;
}
}
cout<<"\n\n\t";
if(strcmpi(pro1.gen, "Male")==0)
cout<<"Dear Mr. ";
else
{
if(strcmpi(pro1.ms, "Married")==0)
cout<<"Dear Mrs. ";
else
cout<<"Dear Ms. ";
}
cout<<pro1.f_name<<' '<<pro1.l_name;
cout<<"\n\n\t\tARE YOU SURE YOU WANT TO CANCEL THE
TICKET [Y/N] ? ";
x=wherex();
y=wherey();
can:
cin>>choice;
if((choice!='y') && (choice!='Y') && (choice!='n') && (choice!
='N'))
{
gotoxy(x, y-1);
cout<<' ';
gotoxy(x,y-1);
goto can;
}
if((choice=='N') || (choice=='n'))
{
cout<<"\n\n\t\tReturning to Main Menu....";
startup_menu();
}
ofstream fc("cancel.dat", ios::binary|ios::app);
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(p!=pro1.pnr)
fout.write((char*)&pro1, sizeof(pro1));
else
fc.write((char*)&pro1, sizeof(pro1));
}
cout<<"\n\n\tThe Ticket Was Cancelled
Successfully......\n\n\tand INR "<<0.25*pro1.fare<<" has been
deducted, as under the terms and conditions.";
fin.close();
fout.close();
53

remove("air_pass.dat");
rename("temp.dat", "air_pass.dat");
fin.open("air_pass.dat", ios::binary|ios::nocreate);
if(!fin.read((char*)&pro1, sizeof(pro1)))
remove("air_pass.dat");
fin.close();
cout<<"\n\nPRESS ANY KEY TO CONTINUE....";
getch();
startup_menu();
}
//SEARCH BY PNR
void pnrx()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
ij();
long int p;
cout<<"\n\n\n\tEnter the PNR No. : ";
cin>>p;
int temp=0;
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(pro1.pnr==p)
{
temp=1;
display();
break;
}
}
fin.close();
char ch;
if(temp==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
pnrx();
else if(ch==27)
search();
54

else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By PNR \nAnd
ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
pnrx();
else
search();
}
//SEARCH BY FIRST NAME
void f_namex()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag;
char ch, fname[50];
ij();
flag=0;
cout<<"\n\n\n\tEnter First Name : ";
gets(fname);
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(strcmpi(fname,pro1.f_name)==0)
{
flag=1;
display();
}
}
fin.close();
if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
55

f_namex();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By First
Name \nAnd ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
f_namex();
else
search();
}
//SEARCH BY LAST NAME
void l_namex()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag;
char ch, lname[50];
ij();
flag=0;
cout<<"\n\n\n\tEnter Last Name : ";
gets(lname);
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(strcmpi(lname,pro1.l_name)==0)
{
flag=1;
display();
}
}
fin.close();
if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
x=wherex();
y=wherey();
56

ee:
ch=getch();
if(ch==13)
l_namex();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By Last Name
\nAnd ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
l_namex();
else
search();
}
//SEARCH BY CITY
void cityx()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag;
char ch, city[50];
ij();
flag=0;
cout<<"\n\n\n\tEnter City : ";
gets(city);
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmpi(city,pro1.city)==0))
{
flag=1;
display();
}
}
fin.close();
if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
57

x=wherex();
y=wherey();
ee:
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
ch=getch();
if(ch==13)
cityx();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By City \nAnd
ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
cityx();
else
search();
}
//SEARCH BY COUNTRY
void countryx()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag;
char ch, cntry[50];
ij();
flag=0;
cout<<"\n\n\n\tEnter Country : ";
gets(cntry);
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmpi(cntry,pro1.country)==0))
{
flag=1;
display();
}
}
fin.close();
58

if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
countryx();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By Country
\nAnd ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
countryx();
else
search();
}
//SEARCH BY ORIGIN
void originx()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag, org;
char ch, origin[8];
a:
ij();
flag=0;
cout<<"\n\n\t\tOrigin :\n\t\t1. MUMBAI\n\t\t2. DELHI\n\t\t3.
KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
cin>>org;
if(org<1 || org>4)
{
cout<<"\n\nINVALID SELECTION....Press Any Key To TRY
AGAIN...";
getch();
goto a;
59

}
if(org==1)
strcpy(origin,"MUMBAI");
else if(org==2)
strcpy(origin, "DELHI");
else if(org==3)
strcpy(origin, "KOLKATA");
else if(org==4)
strcpy(origin, "JODHPUR");
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(strcmpi(origin,pro1.origin)==0)
{
flag=1;
display();
}
}
fin.close();
if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
originx();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By Origin
\nAnd ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
originx();
else
search();
}
60

//SEARCH BY DESTINATION
void destx()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::in);
int flag, dest;
char ch, desti[8];
a:
ij();
flag=0;
cout<<"\n\t\tDestination:\n\t\t1. MUMBAI\n\t\t2. DELHI\n\t\t3.
KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
cin>>dest;
if(dest<1 || dest>4)
{
cout<<"\n\nINVALID SELECTION....Press Any Key To TRY
AGAIN...";
getch();
goto a;
}
if(dest==1)
strcpy(desti,"MUMBAI");
else if(dest==2)
strcpy(desti, "DELHI");
else if(dest==3)
strcpy(desti, "KOLKATA");
else if(dest==4)
strcpy(desti, "JODHPUR");
fin.seekg(0,ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(strcmpi(desti,pro1.dest)==0)
{
flag=1;
display();
}
}
fin.close();
if(flag==0)
{
int x, y;
cout<<"\n\nNo Match Found.......!!!";
cout<<"\n\nPress ENTER To Try Again \nAnd ESC To
Return To Search Menu : ";
61

x=wherex();
y=wherey();
ee:
ch=getch();
if(ch==13)
destx();
else if(ch==27)
search();
else
{
gotoxy(x,y);
goto ee;
}
}
cout<<"\n\nPress ENTER To Continue Searching By
Destination \nAnd ESC To Return To Search Menu : ";
ch=getch();
if(ch==13)
destx();
else
search();
}
//SEARCH FUNCTION
void search()
{
int x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8;
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
if(!fin)
{
fin.close();
ij();
gotoxy(19,10);
cout<<"\n\n\t\t\t\tSEARCH MENU";
cout<<"\n\t\t\t\t-----------";
cout<<"\n\n\t\t\tNo Entries....!!!";
cout<<"\n\n\n\t\tPRESS ANY KEY TO CONTINUE....";
getch();
startup_menu();
}
fin.close();
int c;
start:
ij();
cout<<"\n\n\t\t\t\tWELCOME TO SEARCH MENU";
cout<<"\n\t\t\t\t----------------------";
cout<<"\n\n\tSEARCH BY";
62

cout<<"\n\n\t1.
x1=wherex();
y1=wherey();
cout<<"\n\n\t2.
x2=wherex();
y2=wherey();
cout<<"\n\n\t3.
x3=wherex();
y3=wherey();
cout<<"\n\n\t4.
x4=wherex();
y4=wherey();
cout<<"\n\n\t5.
x5=wherex();
y5=wherey();
cout<<"\n\n\t6.
x6=wherex();
y6=wherey();
cout<<"\n\n\t7.
x7=wherex();
y7=wherey();
cout<<"\n\n\t8.
x8=wherex();
y8=wherey();

PNR No.

: ";

First Name

: ";

Last Name

: ";

City

: ";

Country
Origin

: ";
: ";

Destination

: ";

Return To Main Menu : ";

gotoxy(1,33);
cout<<"--------------------------------------------------------------------------\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\nPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\nPress <ENTER>
To Select";
pn:
gotoxy(x1,y1);
c=getch();
if(c==13)
pnrx();
else if(c==32)
{
fn:
gotoxy(x2,y2);
c=getch();
if(c==13)
f_namex();
else if(c==32)
{
ln:
gotoxy(x3,y3);
c=getch();
if(c==13)
63

l_namex();
else if(c==32)
{
ct:
gotoxy(x4,y4);
c=getch();
if(c==13)
cityx();
else if(c==32)
{
con:
gotoxy(x5,y5);
c=getch();
if(c==13)
countryx();
else if(c==32)
{
o:
gotoxy(x6,y6);
c=getch();
if(c==13)
originx();
else if(c==32)
{
d:
gotoxy(x7,y7);
c=getch();
if(c==13)
destx();
else if(c==32)
{
ret:
gotoxy(x8,y8);
c=getch();
if(c==13)
startup_menu();
else if(c==8)
goto d;
else
goto ret;
}
else if(c==8)
goto o;
else
goto d;
}
else if(c==8)
goto con;
else
goto o;
64

}
else if(c==8)
goto ct;
else
goto ln;
}
else if(c==8)
goto ln;
else
goto ct;
}
else if(c==8)
goto fn;
else
goto ln;
}
else if(c==8)
goto pn;
else
goto fn;
}
else
goto pn;
}
//CREDIT CARD DETAILS
void ccdetails()
{
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
if(!fin)
{
fin.close();
ij();
cout<<"\n\t\t\tWELCOME TO CREDIT CARD DETAILS
MENU";
cout<<"\n\t\t\t-----------------------------------";
cout<<"\n\n\t\tNo Entries....!!!";
cout<<"\n\n\n\t\tPRESS ANY KEY TO CONTINUE....";
getch();
startup_menu();
}
ij();
cout<<"\n\t\t\tWELCOME TO CREDIT CARD DETAILS MENU";
cout<<"\n\t\t\t-----------------------------------";
char ch, pass[21];
long int p;
int i, x, y, flag=0;
cout<<"\n\n\t\tEnter PNR Number : ";
65

cin>>p;
e:
cout<<"\n\n\t\tEnter passsword(SPACES NOT ALLOWED) : ";
for(i=0;i<=20;i++)
{
x=wherex();
y=wherey();
ch=getch();
if(ch==8)
{
x=x-1;
gotoxy(x,y);
cout<<' ';
pass[i-1]='\0';
gotoxy(x,y);
i=i-2;
}
else if(ch==13)
{
pass[i]='\0';
break;
}
else if(ch==32)
{
cout<<"\nSpaces not allowed...";
goto e;
}
else
{
cout<<'*';
pass[i]=ch;
}
if(i==20)
{
cout<<"\nPassword cannot exceed 20
characters...";
goto e;
}
}
if(pass[0]=='\0')
{
cout<<"\n\nCompulsory Field...";
goto e;
}
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
66

if((strcmp(pass, pro1.password)==0) &&


(p==pro1.pnr))
{
flag=1;
ij();
cout<<"\n\n\t\t CREDIT CARD DETAILS\n";
cout<<"\n\t1. Credit Card Number :
"<<pro1.cc_number;
cout<<"\n\t2. Bank Name
:
"<<pro1.cc_bank;
cout<<"\n\t3. Card Type
: "<<pro1.card;
cout<<"\n\t4. First Name
: "<<pro1.f_cname;
cout<<"\n\t5. Last Name
:
"<<pro1.l_cname;
cout<<"\n\t6. Expiry Date
: "<<pro1.cc_date;
cout<<"\n\t7. Origin
: "<<pro1.origin;
cout<<"\n\t8. Destination
: "<<pro1.dest;
cout<<"\n\t9. Fare
: INR "<<pro1.fare;
cout<<"\n\n\tPress Any Key to Return to Main
Menu...";
getch();
break;
}
}
fin.close();
if(flag==0)
{
char ch;
cout<<"\n\nPassword and PNR No. do not match......!!!";
cout<<"\n\nPress ENTER To Try Again And\nESC To
Return To Main Menu : ";
ch=getch();
if(ch==13)
ccdetails();
else if(ch==27)
startup_menu();
}
startup_menu();
}
//CANCELLED TICKETS
void cancel()
{
ifstream fin;
fin.open("cancel.dat",ios::binary||ios::nocreate);
if(!fin)
{
fin.close();
ij();
cout<<"\n\t\t\tWELCOME CANCELLED TICKETS MENU";
67

cout<<"\n\t\t\t------------------------------";
cout<<"\n\n\t\tNo Entries....!!!";
cout<<"\n\n\n\t\tPRESS ANY KEY TO CONTINUE....";
getch();
startup_menu();
}
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
ij();
cout<<"\n\t\t\tCANCELLED TICKETS :";
cout<<"\n\t\t\t-------------------";
cout<<"\n\n\tPNR Number
: "<<pro1.pnr;
cout<<"\n\tFirst Name
: "<<pro1.f_name;
cout<<"\n\tLast Name
: "<<pro1.l_name;
cout<<"\n\tGender
: "<<pro1.gen;
cout<<"\n\tMarital Status
: "<<pro1.ms;
cout<<"\n\tAddress
: "<<pro1.address;
cout<<"\n\tCity
: "<<pro1.city;
cout<<"\n\tCountry
: "<<pro1.country;
cout<<"\n\tMobile Number
: "<<pro1.mob;
cout<<"\n\tLandline Number
: "<<pro1.land;
cout<<"\n\tE-Mail Address
: "<<pro1.mail;
cout<<"\n\tOrigin
: "<<pro1.origin;
cout<<"\n\tDestination
: "<<pro1.dest;
cout<<"\n\tTrip
: "<<pro1.trip;
cout<<"\n\tClass
: "<<pro1.type;
cout<<"\n\tFare
: INR"<<pro1.fare;
cout<<"\n\n\tPRESS ANY KEY TO CONTINUE....";
getch();
}
startup_menu();
}

//REPORT Del-Mum
void rep_delmum(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From DELHI To MUMBAI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
68

cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();


cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
69

ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Del-Kol
void rep_delkol(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
70

cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From DELHI To KOLKATA:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
71

}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}

72

//REPORT Del-Jod
void rep_deljod(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From DELHI To JODHPUR:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
73

else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"DELHI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
74

cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";


getch();
report_flt();
}
//REPORT Mum-del
void rep_mumdel(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From MUMBAI To DELHI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
75

report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
76

if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}

//REPORT Mum-Kol
void rep_mumkol(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From MUMBAI To KOLKATA:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
77

if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
78

}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Mum-Jod
void rep_mumjod(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From MUMBAI To JODHPUR:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
79

c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
80

case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"MUMBAI")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Kol-Del
void rep_koldel(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From KOLKATA To DELHI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
81

x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));

82

if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Kol-Mum
void rep_kolmum(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From KOLKATA To MUMBAI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
83

cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();


y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
84

{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Kol-Jod
void rep_koljod(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
85

cout<<"\tNo. Of Passengers Flying From KOLKATA To JODHPUR:


"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
86

goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"KOLKATA")==0) &&
(strcmp(pro1.dest,"JODHPUR")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Jod-Del
void rep_joddel(int pass_no)
{
ij();
87

char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From JODHPUR To DELHI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
88

goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"DELHI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
89

}
//REPORT Jod-Mum
void rep_jodmum(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From JODHPUR To MUMBAI:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
report_flt();
else if(c==8)
goto d3;
else goto menu;
}
90

else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"MUMBAI")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
91

break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//REPORT Jod-Kol
void rep_jodkol(int pass_no)
{
ij();
char c;
int x,x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\tPASSENGER DETAILS";
cout<<"\n\t\t-----------------";
cout<<"\n\n";
cout<<"\tNo. Of Passengers Flying From JODHPUR To KOLKATA:
"<<pass_no;
cout<<"\n\n\n\tRecord Of Passengers Flying On:";
cout<<"\n\n\t\t";
cout<<"1. 05 / 02 / 2009 :"; x1=wherex(); y1=wherey();
cout<<"\n\n\t\t2. 03 / 03 / 2009 :"; x2=wherex(); y2=wherey();
cout<<"\n\n\t\t3. 11 / 04 / 2009 :"; x3=wherex(); y3=wherey();
cout<<"\n\n\t\t4. Return To Previous Menu :"; x4=wherex();
y4=wherey();
d1:
gotoxy(x1,y1);
c=getch();
if(c==13)
x=1;
else if(c==32)
{
d2:
gotoxy(x2,y2);
c=getch();
if(c==13)
x=2;
else if(c==32)
{
d3:
gotoxy(x3,y3);
c=getch();
if(c==13)
x=3;
else if(c==32)
{
menu:
gotoxy(x4,y4);
c=getch();
if(c==13)
92

report_flt();
else if(c==8)
goto d3;
else goto menu;
}
else if(c==8)
goto d2;
else
goto d3;
}
else if(c==8)
goto d1;
else
goto d2;
}
else
goto d1;
ij();
ifstream fin;
fin.open("air_pass.dat",ios::binary||ios::nocreate);
fin.seekg(0,ios::beg);
switch(x)
{
case 1:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"05/02/2009")==0))
display();
}
fin.close();
break;
case 2:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"03/03/2009")==0))
display();
}
fin.close();
break;
case 3:
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
93

if((strcmp(pro1.origin,"JODHPUR")==0) &&
(strcmp(pro1.dest,"KOLKATA")==0) &&
(strcmp(pro1.d_date,"11/04/2009")==0))
display();
}
fin.close();
break;
}
cout<<"\n\n\t\tPress Any Key To Return To Flight Table...";
getch();
report_flt();
}
//FLIGHT TABLE
void report_flt()
{
ij();
char ch,choice;
int
x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,y1,y2,y3,y4,y5,y6,y7,y
8,y9,y10,y11,y12,y13;
getch();
cout<<"\n
FLIGHT TABLE
";
cout<<"\n\n=================================
===========================";
cout<<"\n\n
PASSENGER'S ORIGIN-DESTINATION MOVEMENT
";
cout<<"\n\n=================================
===========================";
cout<<"\n\n\n\t\t"; x1=wherex(); cout<<"DELHI";
cout<<"
";
x2=wherex(); cout<<"MUMBAI";
cout<<"
";
x3=wherex(); cout<<"KOLKATA";
cout<<"
";
x4=wherex(); cout<<"JODHPUR";
cout<<"\n\n------------------------------------------------------------";
cout<<"\n\nDELHI";
y1=wherey();
cout<<"\n\n------------------------------------------------------------";
cout<<"\n\nMUMBAI";
y2=wherey();
cout<<"\n\n------------------------------------------------------------";
cout<<"\n\nKOLKATA";
y3=wherey();
cout<<"\n\n------------------------------------------------------------";
cout<<"\n\nJODHPUR";
y4=wherey();
cout<<"\n\n------------------------------------------------------------";
gotoxy(x1,y1);
cout<<" XX";
int x1a;
//x1a=wherex();
94

gotoxy(x2,y2);
cout<<" XX";
int x2a;
//x2a=wherex();
gotoxy(x3,y3);
cout<<" XX";
int x3a;
//x3a=wherex();
gotoxy(x4,y4);
cout<<" XX";
int x4a;
//x4a=wherex();
ifstream fin;
fin.open("air_pass.dat",ios::binary|ios::nocreate);
fin.seekg(0, ios::beg);
if(!fin)
{
fin.close();
getch();
report_menu();
}
else
{
int
del_mum,del_kol,del_jod,mum_del,mum_kol,mum_jod,kol_del,kol_m
um,kol_jod,jod_del,jod_mum,jod_kol;
del_mum=0;del_kol=0;del_jod=0;mum_del=0;
mum_kol=0;mum_jod=0;kol_del=0;kol_mum=0;
kol_jod=0;jod_del=0;jod_mum=0;jod_kol=0;
fin.seekg(0, ios::beg);
while(!fin.eof())
{
fin.read((char*)&pro1, sizeof(pro1));
if(strcmpi(pro1.origin,"DELHI")==0 &&
strcmpi(pro1.dest,"MUMBAI")==0)
del_mum++;
else if(strcmpi(pro1.origin,"DELHI")==0 &&
strcmpi(pro1.dest,"KOLKATA")==0)
del_kol++;
else if(strcmpi(pro1.origin,"DELHI")==0 &&
strcmpi(pro1.dest,"JODHPUR")==0)
del_jod++;
else if(strcmpi(pro1.origin,"MUMBAI")==0 &&
strcmpi(pro1.dest,"DELHI")==0)
mum_del++;
95

else if(strcmpi(pro1.origin,"MUMBAI")==0 &&


strcmpi(pro1.dest,"KOLKATA")==0)
mum_kol++;
else if(strcmpi(pro1.origin,"MUMBAI")==0 &&
strcmpi(pro1.dest,"JODHPUR")==0)
mum_jod++;
else if(strcmpi(pro1.origin,"KOLKATA")==0 &&
strcmpi(pro1.dest,"DELHI")==0)
kol_del++;
else if(strcmpi(pro1.origin,"KOLKATA")==0 &&
strcmpi(pro1.dest,"MUMBAI")==0)
kol_mum++;
else if(strcmpi(pro1.origin,"KOLKATA")==0 &&
strcmpi(pro1.dest,"JODHPUR")==0)
kol_jod++;
else if(strcmpi(pro1.origin,"JODHPUR")==0 &&
strcmpi(pro1.dest,"DELHI")==0)
jod_del++;
else if(strcmpi(pro1.origin,"JODHPUR")==0 &&
strcmpi(pro1.dest,"MUMBAI")==0)
jod_mum++;
else if(strcmpi(pro1.origin,"JODHPUR")==0 &&
strcmpi(pro1.dest,"KOLKATA")==0)
jod_kol++;
}
fin.close();
gotoxy(x2,y1);
//DEL-MUM
cout<<" "<<del_mum;
gotoxy(x3,y1);
//DEL-KOL
cout<<" "<<del_kol;
gotoxy(x4,y1);
//DEL-JOD
cout<<" "<<del_jod;
gotoxy(x3,y2);
//MUM-KOL
cout<<" "<<mum_kol;
gotoxy(x4,y2);
//MUM-JOD
cout<<" "<<mum_jod;
gotoxy(x1,y2);
//MUM-DEL
cout<<" "<<mum_del;
gotoxy(x1,y3);
//KOL-DEL
cout<<" "<<kol_del;
gotoxy(x2,y3);
//KOL-MUM
cout<<" "<<kol_mum;
96

gotoxy(x4,y3);
//KOL-JOD
cout<<" "<<kol_jod;
gotoxy(x3,y4);
//JOD-KOL
cout<<" "<<jod_kol;
gotoxy(x2,y4);
//JOD-MUM
cout<<" "<<jod_mum;
gotoxy(x1,y4);
//JOD-DEL
cout<<" "<<jod_del;
int y=0;
//1st Vert
for(y=y1-5;y<=y4+5;y++)
{
gotoxy(x1-6,y);
cout<<"|";
}
//2nd Vert
for(y=y1-5;y<=y4+5;y++)
{
gotoxy(x1+8,y);
cout<<"|";
}
//3rd Vert
for(y=y1-5;y<=y4+5;y++)
{
gotoxy(x2+8,y);
cout<<"|";
}
//4th Vert
for(y=y1-5;y<=y4+5;y++)
{
gotoxy(x3+9,y);
cout<<"|";
}
cout<<"\n\n\nPress Any Key To View Detailed Report...";
getch();
ij();
cout<<"\n\n\n\n";
cout<<"\n\t\tROUTE: ";
cout<<"\n\t\t-----";
cout<<"\n\n\n ->Delhi-Mumbai :";
x1=wherex();y1=wherey(); //CALL THEM
cout<<"\n\n ->Delhi-Kolkata :"; x2=wherex();y2=wherey();
cout<<"\n\n ->Delhi-Jodhpur :"; x3=wherex();y3=wherey();
cout<<"\n\n ->Mumbai-Delhi :"; x4=wherex();y4=wherey();
97

cout<<"\n\n ->Mumbai-Kolkata :"; x5=wherex();y5=wherey();


cout<<"\n\n ->Mumbai-Jodhpur :"; x6=wherex();y6=wherey();
gotoxy(x1,y1);
cout<<"\t ->Kolkata-Delhi :";
x7=wherex();
y7=wherey();
gotoxy(x2,y2);
cout<<"\t ->Kolkata-Mumbai :";
x8=wherex();
y8=wherey();
gotoxy(x3,y3);
cout<<"\t ->Kolkata-Jodhpur:";
x9=wherex();
y9=wherey();
gotoxy(x4,y4);
cout<<"\t ->Jodhpur-Delhi :";
x10=wherex();
y10=wherey();
gotoxy(x5,y5);
cout<<"\t ->Jodhpur-Mumbai : ";
x11=wherex();
y11=wherey();
gotoxy(x6,y6);
cout<<"\t ->Jodhpur-Kolkata: ";
x12=wherex();
y12=wherey();
cout<<"\n\n\t->Return To Previous
Menu:";x13=wherex();y13=wherey();
del_mum:
gotoxy(x1,y1);
ch=getch();
if(ch==13)
rep_delmum(del_mum);
else if(ch==32)
{
del_kol:
gotoxy(x2,y2);
ch=getch();
if(ch==13)
rep_delkol(del_kol);
else if(ch==32)
{
del_jod:
gotoxy(x3,y3);
ch=getch();
if(ch==13)
rep_deljod(del_jod);
else if(ch==32)
{
mum_del:
98

gotoxy(x4,y4);
ch=getch();
if(ch==13)
rep_mumdel(mum_del);
else if(ch==32)
{
mum_kol:
gotoxy(x5,y5);
ch=getch();
if(ch==13)
rep_mumkol(mum_kol);
else if(ch==32)
{
mum_jod:
gotoxy(x6,y6);
ch=getch();
if(ch==13)
rep_mumjod(mum_jod);
else if(ch==32)
{
kol_del:
gotoxy(x7,y7);
ch=getch();
if(ch==13)
rep_koldel(kol_del);
else if(ch==32)
{
kol_mum:
gotoxy(x8,y8);
ch=getch();
if(ch==13)
rep_kolmum(kol_mum);
else if(ch==32)
{
kol_jod:
gotoxy(x9,y9);
ch=getch();
if(ch==13)
rep_koljod(kol_jod);
else if(ch==32)
{
jod_del:
gotoxy(x10,y10);
ch=getch();
if(ch==13)
rep_joddel(jod_del);
else if(ch==32)
{
jod_mum:
gotoxy(x11,y11);
ch=getch();
99

if(ch==13)
rep_jodmum(jod_mum);
else if(ch==32)
{
jod_kol:
gotoxy(x12,y12);
ch=getch();
if(ch==13)
rep_jodkol(jod_kol);
else if(ch==32)
{
menu:
gotoxy(x13,y13);
ch=getch();
if(ch==13)
report_menu();
else if(ch==8)
goto jod_kol;
else
goto menu;
}
else if(ch==8)
goto jod_mum;
else
goto jod_kol;
}
else if(ch==8)
goto jod_del;
else
goto jod_mum;
}
else if(ch==8)
goto kol_jod;
else
goto jod_del;
}
else if(ch==8)
goto kol_mum;
else
goto kol_jod;
}
else if(ch==8)
goto kol_del;
else
goto kol_mum;
}
else if(ch==8)
goto mum_jod;
else
goto kol_del;
}
100

else if(ch==8)
goto mum_kol;
else
goto mum_jod;
}
else if(ch==8)
goto mum_del;
else
goto mum_kol;
}
else if(ch==8)
goto del_jod;
else
goto mum_del;
}
else if(ch==8)
goto del_kol;
else
goto del_jod;
}
else if(ch==8)
goto del_mum;
else
goto del_kol;
}
else goto del_mum;
}
getch();
}

//REPORT FUNCTION
char a_pass[20]="qwerty";
char a_usr[20]="admin";
//REPORT MENU
void report_menu()
{
ij();
int x1,x2,x3,x4,y1,y2,y3,y4;
cout<<"\n\n\t\t\tREPORT MENU";
cout<<"\n\n\t\t\t-----------";
cout<<"\n\n\t1.FLIGHT TABLE: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t2.CANCELLED TICKETS: ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t3.CREDIT CARD DETAILS: ";
101

x3=wherex();
y3=wherey();
cout<<"\n\n\t4.RETURN TO MAIN MENU: ";
x4=wherex();
y4=wherey();
char choice;
gotoxy(1,44);
cout<<"-----------------------------------------------------------------------";
cout<<"\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To Previous Tab";
cout<<"\nPress <ENTER>
To Select";
ft:
gotoxy(x1,y1);
choice=getch();
if(choice==13)
report_flt();
else if(choice==32)
{
ca:
gotoxy(x2,y2);
choice=getch();
if(choice==13)
cancel();
else if(choice==32)
{
cc:
gotoxy(x3,y3);
choice=getch();
if(choice==13)
ccdetails();
else if(choice==32)
{
menu:
gotoxy(x4,y4);
choice=getch();
if(choice==13)
startup_menu();
else if(choice==8)
goto cc;
else
goto menu;
}
else if(choice==8)
goto ca;
else
goto cc;
}
102

else if(choice==8)
goto ft;
else
goto ca;
}
else
goto ft;
}
//REPORT PASSWORD SECTION
void report()
{
int temp=0;
char choice,ch;
a:
ij();
char pass_t[20];
char usr_t[20];
cout<<"\n\n\t\t\tWELCOME TO REPORT MENU";
cout<<"\n\n\t\t\t----------------------";
cout<<"\n\n\t\tADMINISTRATOR USER_NAME: ";
gets(usr_t);
e:
cout<<"\n\t\tADMINISTRATOR PASSWORD:";
int x,y;
for(int i=0;i<=20;i++)
{
x=wherex();
y=wherey();
ch=getch();
if(ch==8)
{
if(i==0)
{
gotoxy(x,y);
i--;
continue;
}
x=x-1;
gotoxy(x,y);
cout<<' ';
pass_t[i-1]='\0';
gotoxy(x,y);
i=i-2;
}
else if(ch==13)
{
pass_t[i]='\0';
break;
103

}
else if(ch==32)
{
cout<<"\nSpaces not allowed...";
goto e;
}
else
{
cout<<'*';
pass_t[i]=ch;
}
if(i==20)
{
cout<<"\nPassword cannot exceed 20
characters...";
goto e;
}
}
if((strcmp(pass_t,a_pass)==0) && (strcmp(a_usr,usr_t)==0))
{
temp=1;
cout<<"\n\n\t\tACCESS AUTHORISED";
cout<<"\n\n\t\tProceeding....";
delay(800);
cout<<"...";
delay(800);
cout<<"...";
}
else
temp=0;
if(temp==0)
{
cout<<"\n\n\t\tACCESS DENIED";
cout<<"\n\n\t\tDo You Want To Retry?[Y/N]: ";
cin>>ch;
if(ch=='y' || ch=='Y')
goto a;
else if(ch=='n' || ch=='N')
{
cout<<"\n\n\t\t\tRETURNING TO MAIN MENU";
cout<<"\n\n\tPress Any Key To Continue";
getch();
startup_menu();
}
else
startup_menu();
}
104

else if(temp==1)
{
report_menu();
}
getch();
startup_menu();
}
void about()
{
ij();
cout<<"\n\t\t\t\t*SOFTWARE DETAILS*\n\n";
cout<<"Features :\n";
cout<<"\n\n\n\t1. Easy User-Interface :";
cout<<"\n\n\t\t- Menu Driven facilitated by simple keybars";
cout<<"\n\n\n\t2. Secure - Password Protected :";
cout<<"\n\n\t\t- Credit Card details secured from\n\n\t\t nonadministrators through password protection";
cout<<"\n\n\t\t- Credit Card details encrypted";
cout<<"\n\n\t\t- Independent password for each user;\n\n\t\t
Passenger details tamper-proof";
cout<<"\n\n\n\t3. Help File with Demo Run Tutorial :";
cout<<"\n\n\t\t- Demo Run providing the user an idea\n\n\t\t
on how to use the program and\n\n\t\t how it functions";
cout<<"\n\n\n\t4. Datafile Handling :";
cout<<"\n\n\t\t- Records are stored in the system\n\n\t\t
memory and can be easily transferred\n\n\t\t to other systems";
cout<<"\n\n\n\5. Flight Table :";
cout<<"\n\n\t\t- A descriptive, easy to understand\n\n\t\t
passenger movement table";
help();
}
void help()
{
ij();
int x1, x2, x3, y1, y2, y3;
char ch;
cout<<"\n\n\t\t\t\tWELCOME TO HELP MENU";
cout<<"\n\t\t\t\t--------------------";
cout<<"\n\n\n\n\t1. MAIN FEATURES OF SOFTWARE : ";
x1=wherex();
y1=wherey();
cout<<"\n\n\n\t2. DEMO RUN : TUTIORIAL : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\n\t3. RETURN TO MAIN MENU : ";
x3=wherex();
y3=wherey();
105

cout<<"\n\n\n\n\n----------------------------------------------------------------------\n";
cout<<"\n\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\nPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\nPress <ENTER>
To Select";
abou:
gotoxy(x1,y1);
ch=getch();
if(ch==13)
about();
else if(ch==32)
{
demo:
gotoxy(x2,y2);
ch=getch();
if(ch==13)
demo();
else if(ch==32)
{
ret:
gotoxy(x3,y3);
ch=getch();
if(ch==13)
startup_menu();
else if(ch==8)
goto demo;
else
goto ret;
}
else if(ch==8)
goto abou;
else
goto demo;
}
else
goto abou;
}
void demo()
{
int c, x, y;
ij();
cout<<"\n\n\t\t\t\tWELCOME TO DEMO RUN MENU\n\n";
cout<<"\tChoose to see its Demo Run :\n\n";
cout<<"\n\n\t1. TICKET BOOKING : ";
cout<<"\n\n\t2. EDIT PASSENGER INFORMATION : ";
cout<<"\n\n\t3. SEARCH : ";
cout<<"\n\n\t4. CANCEL TICKET :";
cout<<"\n\n\tENTER '5' TO RETURN TO PREVIOUS MENU...";
106

cout<<"\n\n\n\tEnter Choice : ";


x=wherex();
y=wherey();
choi:
cin>>c;
if(c==1)
tbdemo();
else if(c==2)
epidemo();
else if(c==3)
sdemo();
else if(c==4)
ctdemo();
else if(c==5)
help();
else
{
gotoxy(x,y);
cout<<' ';
gotoxy(x,y);
goto choi;
}
}
void tbdemo()
{
char ch;
ij();
int x,x1,y,y1;
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
cout<<"\n\n\t\t3. SEARCH
: ";
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Enter)";
107

gotoxy(x1,y1);
delay(3000);
ij();
cout<<"\n\n\t\tWELCOME TO TICKET BOOKING DEMO";
cout<<"\n\t\t------------------------------\n\n\n";
cout<<"";
cout<<"\n\n\n\tPress 'ENTER' to see the Demo,\n\tand ESC to
return to previous menu...";
ent:
x=wherex();
y=wherey();
ch=getch();
if(ch==27)
help();
else if(ch!=13)
{
gotoxy(x,y);
goto ent;
}
ij();
cout<<"\n\t\t\tE-TICKET BOOKING COUNTER";
cout<<"\n\t\t\t------------------------";
cout<<"\n\n\t\t\t\tSELECT ROUTE";
cout<<"\n\t\t\t\t------------";
cout<<"\n\n\n\t\tOrigin :\n\t\t1. MUMBAI\n\t\t2. DELHI\n\t\t3.
KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
delay(2000);
cout<<'4';
delay(400);
cout<<"\n\n\n\t\tDestination :\n\t\t1. MUMBAI\n\t\t2.
DELHI\n\t\t3. KOLKATA\n\t\t4. JODHPUR";
cout<<"\n\t\t\tENTER CHOICE : ";
delay(2000);
cout<<'3';
delay(800);
cout<<"\n\n\n\t\tAvailable Dates for Journey :";
cout<<"\n\n\t\t\t 1. 05 / 02 / 2009";
cout<<"\n\n\t\t\t 2. 03 / 03 / 2009";
cout<<"\n\n\t\t\t 3. 11 / 04 / 2009";
cout<<"\n\n\t\tTime of\n\t\tDeparture : 0200 hours\n\t\tArrival
: 0350hours";
delay(1000);
cout<<"\n\n\tDo you want to fly on available dates [Y/N] ? ";
delay(6000);
cout<<'Y';
delay(400);
cout<<"\n\n\t\tENTER CHOICE : ";
delay(2000);
cout<<'2';
108

delay(400);
cout<<"\n\n\t\tDate of Journey : 03 / 03 / 2009";
cout<<"\n\n\n\t\tTrip :\n\t\t1. One Way\n\t\t2.
Return\n\t\t\tENTER CHOICE : ";
delay(2000);
cout<<'2';
delay(400);
cout<<"\n\n\n\t\tAvailable Dates for Return Journey :";
cout<<"\n\n\t\t\t 1. 06 / 02 / 2009";
cout<<"\n\n\t\t\t 2. 05 / 03 / 2009";
cout<<"\n\n\t\t\t 3. 14 / 04 / 2009";
cout<<"\n\n\t\tTime of\n\t\tDeparture : 0600 hours\n\t\tArrival
: 0750hours";
delay(1000);
cout<<"\n\n\tEnter 'Y' to fly on available dates,\n\t'N' to
cancel booking ticket,\n\tand 'O' to opt for a 'ONE WAY' ticket...";
delay(6000);
cout<<'Y';
delay(400);
cout<<"\n\n\t\tENTER CHOICE : ";
delay(2000);
cout<<'2';
delay(400);
cout<<"\n\n\t\tDate of Return Journey : 05 / 03 / 2009";
cout<<"\n\n\n\t\tType :\n\t\t1. Economy Class\n\t\t2.
Executive Class\n\t\t3. Business Class\n\t\t\tENTER CHOICE : ";
delay(2000);
cout<<'2';
delay(3000);
clrscr();
ij();
cout<<"\nFare @ EXECUTIVE CLASS is INR 24890";
cout<<"\n\n\t\tPress Any Key To Proceed To Fill In Passenger
Details... ";
delay(3000);
clrscr();
cout<<"\n\t\t\tPASSENGER INFORMATION";
cout<<"\n\t\t\t---------------------";
cout<<"\n\n\n\t*Enter First Name : ";
delay(2000);
cout<<'R';
delay(200);
cout<<'a';
delay(200);
cout<<'j';
delay(200);
cout<<'e';
delay(200);
cout<<'e';
delay(200);
cout<<'v';
109

delay(400);
cout<<"\n\n\n\t*Enter Last Name : ";
delay(2000);
cout<<'K';
delay(200);
cout<<'a';
delay(200);
cout<<'p';
delay(200);
cout<<'o';
delay(200);
cout<<'o';
delay(200);
cout<<'r';
delay(400);
cout<<"\n\n\n\t*Enter Gender (M-Male, F-Female) : ";
delay(2000);
cout<<'M';
delay(400);
cout<<"\n\n\n\t*Married (Y/N) ? : ";
delay(2000);
cout<<'N';
delay(400);
cout<<"\n\n\n\n\t\t\tCONTACT ADDRESS";
cout<<"\n\t\t\t----------------";
cout<<"\n\n\n\t*Enter Address : ";
delay(2000);
cout<<'A';
delay(200);
cout<<'-';
delay(200);
cout<<'1';
delay(200);
cout<<'1';
delay(200);
cout<<'1';
delay(200);
cout<<' ';
delay(200);
cout<<'A';
delay(200);
cout<<'s';
delay(200);
cout<<'t';
delay(200);
cout<<'h';
delay(200);
cout<<'a';
delay(200);
cout<<' ';
delay(200);
110

cout<<'C';
delay(200);
cout<<'o';
delay(200);
cout<<'l';
delay(200);
cout<<'o';
delay(200);
cout<<'n';
delay(200);
cout<<'y';
delay(400);
cout<<"\n\n\n\t*Enter City : ";
delay(2000);
cout<<'J';
delay(200);
cout<<'o';
delay(200);
cout<<'d';
delay(200);
cout<<'h';
delay(200);
cout<<'p';
delay(200);
cout<<'u';
delay(200);
cout<<'r';
delay(400);
cout<<"\n\n\n\t*Enter Country : ";
delay(2000);
cout<<'I';
delay(200);
cout<<'n';
delay(200);
cout<<'d';
delay(200);
cout<<'i';
delay(200);
cout<<'a';
delay(400);
cout<<"\n\n\n\n\t\t\tCONTACT NUMBER";
cout<<"\n\t\t\t--------------";
cout<<"\n\n\n\tEnter Mobile Number(add country code) : +";
delay(2000);
cout<<'9';
delay(200);
cout<<'1';
delay(200);
cout<<'9';
delay(200);
cout<<'4';
111

delay(200);
cout<<'1';
delay(200);
cout<<'4';
delay(200);
cout<<'1';
delay(200);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'3';
delay(200);
cout<<'4';
delay(200);
cout<<'5';
delay(400);
cout<<"\n\n\n\t*Enter Fixed Line Number(add country and
city code) : +";
delay(2000);
cout<<'9';
delay(200);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'9';
delay(200);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'6';
delay(200);
cout<<'5';
delay(200);
cout<<'1';
delay(200);
cout<<'4';
delay(200);
cout<<'3';
delay(200);
cout<<'2';
delay(400);
cout<<"\n\n\n\tEnter Your E-Mail Address :\n\t\t\t\t";
delay(2000);
cout<<'r';
delay(200);
cout<<'a';
delay(200);
cout<<'j';
112

delay(200);
cout<<'e';
delay(200);
cout<<'e';
delay(200);
cout<<'v';
delay(200);
cout<<'.';
delay(200);
cout<<'1';
delay(200);
cout<<'1';
delay(200);
cout<<'1';
delay(200);
cout<<'@';
delay(200);
cout<<'g';
delay(200);
cout<<'m';
delay(200);
cout<<'a';
delay(200);
cout<<'i';
delay(200);
cout<<'l';
delay(200);
cout<<'.';
delay(200);
cout<<'c';
delay(200);
cout<<'o';
delay(200);
cout<<'m';
delay(400);
cout<<"\n\n\n\n\t\t\tPress Any Key To Continue...";
delay(3000);
ij();
cout<<"\n\t\t\t\tPAYMENT COUNTER";
cout<<"\n\t\t\t\t---------------\n\n";
cout<<"\tDear Mr. Rajeev Kapoor,\n\tyou can pay your fare of
INR 24890 by using your credit card.";
cout<<"\n\n\t\tCREDIT CARD DETAILS";
cout<<"\n\t\t-------------------";
cout<<"\n\n\n\t\tCARD TYPE: ";
cout<<"\n\n\t\t1. VISA \n\t\t2. American Express \n\t\t3. Diners
Club \n\t\t4. Mastercard \n\t\t5. JCB";
cout<<"\n\n\t\tEnter Choice : ";
delay(2000);
cout<<'2';
delay(400);
113

cout<<"\n\n\n\n\tEnter First Name as on Card : ";


delay(2000);
cout<<'R';
delay(200);
cout<<'a';
delay(200);
cout<<'j';
delay(200);
cout<<'e';
delay(200);
cout<<'e';
delay(200);
cout<<'v';
delay(400);
cout<<"\n\n\n\tEnter Last Name as on Card : ";
delay(2000);
cout<<'K';
delay(200);
cout<<'a';
delay(200);
cout<<'p';
delay(200);
cout<<'o';
delay(200);
cout<<'o';
delay(200);
cout<<'r';
delay(400);
cout<<"\n\n\n\tEnter Credit Card Number : ";
delay(2000);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'3';
delay(200);
cout<<'4';
delay(400);
cout<<"\n\n\n\tEnter Expiry Date(DD / MM / YYYY) : ";
delay(2000);
cout<<'1';
delay(200);
cout<<' ';
delay(200);
cout<<'/';
delay(200);
cout<<' ';
delay(200);
cout<<'1';
delay(200);
cout<<' ';
114

delay(200);
cout<<'/';
delay(200);
cout<<' ';
delay(200);
cout<<'2';
delay(200);
cout<<'0';
delay(200);
cout<<'2';
delay(200);
cout<<'0';
delay(400);
cout<<"\n\n\n\tEnter Issuing Bank : ";
delay(2000);
cout<<'I';
delay(200);
cout<<'C';
delay(200);
cout<<'I';
delay(200);
cout<<'C';
delay(200);
cout<<'I';
delay(400);
cout<<"\n\n\n\tAre You Sure You Want To Purchase The Ticket
(Y/N) ? ";
delay(1000);
cout<<'Y';
delay(400);
cout<<"\n\n\n\n\tPlease Wait While Server Connects With
ICICI Server...";
delay(1000);
cout<<"...";
delay(800);
cout<<"...";
cout<<"\n\n\n\tExecuting Your Transaction....Please Wait..";
delay(800);
cout<<"...";
delay(800);
cout<<"...";
cout<<"\n\n\n\n\t\tTRANSACTION COMPLETED
SUCCESSFULLY";
cout<<"\n\n\n\n\n\t\tPress Any Key To Proceed...";
delay(3000);
clrscr();
cout<<"\n\n\n\n\nTHIS DATA IS SENSITIVE AND WILL BE USED
FOR FUTURE REFERENCES";
cout<<"\n\n-------------------------------------------------------------";
cout<<"\n\nYour PNR Number is : 5025";
115

cout<<"\n\nEnter The PNR Number As Seen Above for


confirmation : ";
delay(2000);
cout<<'5';
delay(200);
cout<<'0';
delay(200);
cout<<'2';
delay(200);
cout<<'5';
delay(400);
cout<<"\n\n\nEnter passsword(SPACES NOT ALLOWED) : ";
delay(2000);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
x=wherex();
y=wherey();
cout<<"\t\t\t(airticket)";
gotoxy(x,y);
delay(3000);
clrscr();
cout<<"\n\n\n\t\tThank You For Choosing To Fly With INDIAN
JETLINES...";
cout<<"\n\n\t\tHoping To Serve You On-Board....";
cout<<"\n\n\t\t\tWish You Happy Flying...";
cout<<"\n\n\n\t\t\tEnter Any Key To Return To Startup
Menu...";
delay(5000);
ij();
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
116

cout<<"\n\n\t\t2.
cout<<"\n\n\t\t3.
cout<<"\n\n\t\t4.
cout<<"\n\n\t\t5.
cout<<"\n\n\t\t6.
cout<<"\n\n\t\t7.
gotoxy(1,40);

EDIT PASSENGER INFORMATION : ";


SEARCH
: ";
CANCEL TICKET
: ";
ADMINISTRATOR REPORTS
: ";
HELP
: ";
EXIT
: ";

cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1,y1);
delay(3000);
help();
}
void epidemo()
{
char ch;
int x, y;
ij();
cout<<"\n\n\t\tWELCOME TO EDIT PASSENGER INFORMATION
DEMO";
cout<<"\n\t\t------------------------------------------\n\n\n";
cout<<"";
cout<<"\n\n\n\tPress 'ENTER' to see the Demo,\n\tand ESC to
return to previous menu...";
ent:
x=wherex();
y=wherey();
ch=getch();
if(ch==27)
help();
else if(ch!=13)
{
gotoxy(x,y);
goto ent;
}
ij();
int x1, x2, x3, x4, x5, y1, y2, y3, y4, y5;
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
x2=wherex();
y2=wherey();
117

cout<<"\n\n\t\t3.
cout<<"\n\n\t\t4.
cout<<"\n\n\t\t5.
cout<<"\n\n\t\t6.
cout<<"\n\n\t\t7.
gotoxy(1,40);

SEARCH
: ";
CANCEL TICKET
: ";
ADMINISTRATOR REPORTS
HELP
: ";
EXIT
: ";

: ";

cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(1000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Enter)";
gotoxy(x2,y2);
delay(3000);
ij();
cout<<"\n\t\t\tWELCOME TO EDIT PASSENGER DETAILS
MENU";
cout<<"\n\t\t\t--------------------------------------";
cout<<"\n\n\n\tEnter Your PNR Number : ";
delay(2000);
cout<<'5';
delay(200);
cout<<'0';
delay(200);
cout<<'2';
delay(200);
cout<<'5';
delay(400);
cout<<"\n\n\n\tEnter passsword(Spaces not allowed) : ";
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
118

delay(200);
cout<<'*';
delay(200);
cout<<'*';
x=wherex();
y=wherey();
cout<<"\t\t(airticket)";
gotoxy(x,y);
delay(3000);
ij();
gotoxy(17,10);
cout<<"EDIT PASSENGER DETAILS MENU";
gotoxy(17,11);
cout<<"---------------------------\n";
cout<<"\n\tDear Mr. Rajeev Kapoor,\n\tWhich Field Do You
Want To Change?";
cout<<"\n\n\n\t\t1. NAME : ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. CONTACT NUMBER : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. CONTACT ADDRESS : ";
cout<<"\n\n\t\t4. GENDER & MARITAL STATUS : ";
cout<<"\n\n\t\t5. RETURN TO MAIN MENU : ";
gotoxy(1,40);
cout<<"-----------------------------------------------------------------------\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To Previous Tab";
cout<<"\nPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Enter)";
gotoxy(x2,y2);
delay(3000);
ij();
gotoxy(19,10);
cout<<"EDIT CONTACT NUMBER";
gotoxy(19,11);
cout<<"-------------------";
cout<<"\n\n\tTo skip, Press ENTER";
cout<<"\n\n\t\tOriginal Mobile Number : +919414112345";
cout<<"\n\n\t\tEnter New Mobile Number : +";
119

delay(2000);
cout<<'91';
delay(200);
cout<<'9';
delay(200);
cout<<'4';
delay(200);
cout<<'1';
delay(200);
cout<<'4';
delay(200);
cout<<'1';
delay(200);
cout<<'9';
delay(200);
cout<<'8';
delay(200);
cout<<'7';
delay(200);
cout<<'6';
delay(200);
cout<<'5';
delay(400);
cout<<"\n\n\t\tNew Mobile Number : +919414198765";
cout<<"\n\n\n\t\tOriginal Fixed Landline Number :
+912912651432";
cout<<"\n\n\t\tEnter New Fixed Landline Number : +";
delay(2000);
cout<<'9';
delay(200);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'9';
delay(200);
cout<<'1';
delay(200);
cout<<'2';
delay(200);
cout<<'4';
delay(200);
cout<<'3';
delay(200);
cout<<'2';
delay(200);
cout<<'6';
delay(200);
cout<<'5';
delay(200);
cout<<'1';
120

delay(400);
cout<<"\n\n\t\tNew Landline Number : +912912432651";
cout<<"\n\n\n\t\tOriginal E-Mail Address :
rajeev.111@gmail.com";
cout<<"\n\n\t\tEnter New E-Mail Address : ";
delay(2000);
cout<<'r';
delay(200);
cout<<'a';
delay(200);
cout<<'j';
delay(200);
cout<<'e';
delay(200);
cout<<'e';
delay(200);
cout<<'v';
delay(200);
cout<<'.';
delay(200);
cout<<'k';
delay(200);
cout<<'a';
delay(200);
cout<<'p';
delay(200);
cout<<'o';
delay(200);
cout<<'o';
delay(200);
cout<<'r';
delay(200);
cout<<'@';
delay(200);
cout<<'g';
delay(200);
cout<<'m';
delay(200);
cout<<'a';
delay(200);
cout<<'i';
delay(200);
cout<<'l';
delay(200);
cout<<'.';
delay(200);
cout<<'c';
delay(200);
cout<<'o';
delay(200);
cout<<'m';
121

delay(400);
cout<<"\n\n\t\tNew E-Mail Address :
rajeev.kapoor@gmail.com";
cout<<"\n\n\n\n\tPress Any Key to Return to Previous
Menu...";
delay(3000);
ij();
gotoxy(17,10);
cout<<"\t\tEDIT PASSENGER DETAILS MENU";
cout<<"\n\t\t\t---------------------------\n";
cout<<"\n\tDear Ms. Priyanka Mathur,\n\tWhich Field Do You
Want To Change?";
cout<<"\n\n\n\t\t1. NAME : ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. CONTACT NUMBER : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. CONTACT ADDRESS : ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t\t4. GENDER & MARITAL STATUS : ";
x4=wherex();
y4=wherey();
cout<<"\n\n\t\t5. RETURN TO MAIN MENU : ";
x5=wherex();
y5=wherey();
gotoxy(1,40);
cout<<"-----------------------------------------------------------------------\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To Previous Tab";
cout<<"\nPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Spacebar)";
gotoxy(x2,y2);
delay(2000);
gotoxy(x2+4,y2);
cout<<"
";
gotoxy(x3+4,y3);
cout<<"(Pressing Spacebar)";
gotoxy(x3,y3);
122

delay(2000);
gotoxy(x3+4,y3);
cout<<"

";

gotoxy(x4+4,y4);
cout<<"(Pressing Spacebar)";
gotoxy(x4,y4);
delay(2000);
gotoxy(x4+4,y4);
cout<<"
";
gotoxy(x5+4,y5);
cout<<"(Pressing Enter)";
gotoxy(x5,y5);
delay(3000);
ij();
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
cout<<"\n\n\t\t3. SEARCH
: ";
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1,y1);
delay(3000);
help();
}
void sdemo()
{
char ch;
int x, y;
ij();
cout<<"\n\n\t\tWELCOME TO SEARCH DEMO";
cout<<"\n\t\t----------------------\n\n\n";
cout<<"";
123

cout<<"\n\n\n\tPress 'ENTER' to see the Demo,\n\tand ESC to


return to previous menu...";
ent:
x=wherex();
y=wherey();
ch=getch();
if(ch==27)
help();
else if(ch!=13)
{
gotoxy(x,y);
goto ent;
}
ij();
int x1,x2,x3,x4,x5,x6,x7,x8,y1,y2,y3,y4,y5,y6,y7,y8;
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. SEARCH
: ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Spacebar)";
gotoxy(x2,y2);
delay(2000);
124

gotoxy(x2+4,y2);
cout<<"

";

gotoxy(x3+4,y3);
cout<<"(Pressing Enter)";
gotoxy(x1,y1);
delay(3000);
ij();
cout<<"\n\n\t\t\t\tWELCOME TO SEARCH MENU";
cout<<"\n\t\t\t\t----------------------";
cout<<"\n\n\tSEARCH BY";
cout<<"\n\n\t1. PNR No.
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t2. First Name
: ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t3. Last Name
: ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t4. City
: ";
x4=wherex();
y4=wherey();
cout<<"\n\n\t5. Country
: ";
x5=wherex();
y5=wherey();
cout<<"\n\n\t6. Origin
: ";
cout<<"\n\n\t7. Destination
: ";
cout<<"\n\n\t8. Return To Main Menu : ";
gotoxy(1,33);
cout<<"--------------------------------------------------------------------------";
cout<<"\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To Previous Tab";
cout<<"\nPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Spacebar)";
gotoxy(x2,y2);
delay(2000);
gotoxy(x2+4,y2);
cout<<"
";
125

gotoxy(x3+4,y3);
cout<<"(Pressing Spacebar)";
gotoxy(x3,y3);
delay(2000);
gotoxy(x3+4,y3);
cout<<"
";
gotoxy(x4+4,y4);
cout<<"(Pressing Spacebar)";
gotoxy(x4,y4);
delay(2000);
gotoxy(x4+4,y4);
cout<<"
";
gotoxy(x5+4,y5);
cout<<"(Pressing Enter)";
gotoxy(x5,y5);
delay(3000);
ij();
cout<<"\n\n\n\tEnter Country : ";
delay(2000);
cout<<'I';
delay(200);
cout<<'n';
delay(200);
cout<<'d';
delay(200);
cout<<'i';
delay(200);
cout<<'a';
delay(3000);
ij();
cout<<"\n\tPNR Number
: 5025";
cout<<"\n\n\tFirst Name
: Rajeev";
cout<<"\n\n\tLast Name
: Kapoor";
cout<<"\n\n\tGender
: Male";
cout<<"\n\n\tMarital Status : Single";
cout<<"\n\n\tAddress
: A-111 Astha Colony";
cout<<"\n\n\tCity
: Jodhpur";
cout<<"\n\n\tCountry
: India";
cout<<"\n\n\tMobile Number : +919414112345";
cout<<"\n\n\tLandline Number : +912912651432";
cout<<"\n\n\tE-Mail Address : rajeev.111@gmail.com";
cout<<"\n\n\tOrigin
: JODHPUR";
cout<<"\n\n\tDestination
: KOLKATA";
cout<<"\n\n\tDate of Journey : 03 / 03 / 2009";
cout<<"\n\n\tTime of Flight from JODHPUR to KOLKATA
:\n\t\tDeparture : 0200 hours, Arrival : 0350 hours";
cout<<"\n\n\tTrip
: Return";
126

cout<<"\n\n\tDate of Return Journey : 05 / 03 / 2009";


cout<<"\n\n\tTime of Return Flight :\n\t\tDeparture : 0600
hours, Arrival : 0750 hours";
cout<<"\n\n\tClass
: Executive";
cout<<"\n\n\tFare
: INR 24890";
cout<<"\n\n\t\tPRESS ANY KEY TO CONTINUE....";
delay(10000);
cout<<"\n\nPress ENTER To Continue Searching By Country \n
And ESC To Return To Search Menu : ";
delay(3000);
ij();
cout<<"\n\n\t\t\t\tWELCOME TO SEARCH MENU";
cout<<"\n\t\t\t\t----------------------";
cout<<"\n\n\tSEARCH BY";
cout<<"\n\n\t1. PNR No.
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t2. First Name
: ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t3. Last Name
: ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t4. City
: ";
x4=wherex();
y4=wherey();
cout<<"\n\n\t5. Country
: ";
x5=wherex();
y5=wherey();
cout<<"\n\n\t6. Origin
: ";
x6=wherex();
y6=wherey();
cout<<"\n\n\t7. Destination
: ";
x7=wherex();
y7=wherey();
cout<<"\n\n\t8. Return To Main Menu : ";
x8=wherex();
y8=wherey();
gotoxy(1,33);
cout<<"--------------------------------------------------------------------------";
cout<<"\n";
cout<<"\nPress <SPACEBAR>
To Move To Next Tab";
cout<<"\nPress <BACKSPACE>
To Move To Previous Tab";
cout<<"\nPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
127

cout<<"

";

gotoxy(x2+4,y2);
cout<<"(Pressing Spacebar)";
gotoxy(x2,y2);
delay(2000);
gotoxy(x2+4,y2);
cout<<"
";
gotoxy(x3+4,y3);
cout<<"(Pressing Spacebar)";
gotoxy(x3,y3);
delay(2000);
gotoxy(x3+4,y3);
cout<<"
";
gotoxy(x4+4,y4);
cout<<"(Pressing Spacebar)";
gotoxy(x4,y4);
delay(2000);
gotoxy(x4+4,y4);
cout<<"
";
gotoxy(x5+4,y5);
cout<<"(Pressing Spacebar)";
gotoxy(x5,y5);
delay(2000);
gotoxy(x5+4,y5);
cout<<"
";
gotoxy(x6+4,y6);
cout<<"(Pressing Spacebar)";
gotoxy(x6,y6);
delay(2000);
gotoxy(x6+4,y6);
cout<<"
";
gotoxy(x7+4,y7);
cout<<"(Pressing Spacebar)";
gotoxy(x7,y7);
delay(2000);
gotoxy(x7+4,y7);
cout<<"
";
gotoxy(x8+4,y8);
cout<<"(Pressing Enter)";
gotoxy(x8,y8);
delay(3000);
ij();
gotoxy(19,13);
128

cout<<"Welcome to INDIAN JETLINES E-SERVICES.";


gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
cout<<"\n\n\t\t3. SEARCH
: ";
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1,y1);
delay(3000);
help();
}
void ctdemo()
{
char ch;
int x, y;
ij();
cout<<"\n\n\t\tWELCOME TO CANCEL TICKET DEMO";
cout<<"\n\t\t-----------------------------\n\n\n";
cout<<"";
cout<<"\n\n\n\tPress 'ENTER' to see the Demo,\n\tand ESC to
return to previous menu...";
ent:
x=wherex();
y=wherey();
ch=getch();
if(ch==27)
help();
else if(ch!=13)
{
gotoxy(x,y);
goto ent;
}
ij();
int x1,x2,x3,x4,x5,y1,y2,y3,y4,y5;
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
129

cout<<"To Proceed, Kindly Enter Your Selection.";


cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. SEARCH
: ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
x4=wherex();
y4=wherey();
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
x5=wherex();
y5=wherey();
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1+4,y1);
cout<<"(Pressing Spacebar)";
gotoxy(x1,y1);
delay(2000);
gotoxy(x1+4,y1);
cout<<"
";
gotoxy(x2+4,y2);
cout<<"(Pressing Spacebar)";
gotoxy(x2,y2);
delay(2000);
gotoxy(x2+4,y2);
cout<<"
";
gotoxy(x3+4,y3);
cout<<"(Pressing Spacebar)";
gotoxy(x3,y3);
delay(2000);
gotoxy(x3+4,y3);
cout<<"
";
gotoxy(x4+4,y4);
cout<<"(Pressing Spacebar)";
gotoxy(x4,y4);
delay(2000);
130

gotoxy(x4+4,y4);
cout<<"

";

gotoxy(x5+4,y5);
cout<<"(Pressing BackSpace)";
gotoxy(x5,y5);
delay(2000);
gotoxy(x5+4,y5);
cout<<"
";
gotoxy(x4+4,y4);
cout<<"(Pressing Enter)";
gotoxy(x4,y4);
delay(2000);
ij();
cout<<"\n\t\t\tWELCOME TO TICKET CANCELLATION MENU";
cout<<"\n\t\t\t-----------------------------------";
cout<<"\n\n\t\tEnter the PNR No. : ";
delay(2000);
cout<<'5';
delay(200);
cout<<'0';
delay(200);
cout<<'2';
delay(200);
cout<<'5';
delay(400);
cout<<"\n\n\t\tEnter passsword(SPACES NOT ALLOWED) : ";
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
delay(200);
cout<<'*';
x=wherex();
y=wherey();
cout<<"\t (airticket)";
gotoxy(x,y);
delay(800);
131

cout<<"\n\n\n\n\tDear Mr. Rajeev Kapoor";


cout<<"\n\n\t\tARE YOU SURE YOU WANT TO CANCEL THE
TICKET [Y/N] ? ";
delay(3000);
cout<<'Y';
delay(800);
cout<<"\n\n\n\tThe Ticket Was Cancelled
Successfully......\n\n\tand INR 6222.5 has been deducted, as under
the terms and conditions.";
cout<<"\n\nPRESS ANY KEY TO CONTINUE....";
delay(4000);
ij();
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
cout<<"\n\n\t\t3. SEARCH
: ";
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
cout<<"\n\n\t\t6. HELP
: ";
cout<<"\n\n\t\t7. EXIT
: ";
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
gotoxy(x1,y1);
delay(3000);
help();
}
//DISPLAY FUNCTION
void display()
{
ij();
cout<<"\n\tPNR Number
: "<<pro1.pnr;
cout<<"\n\n\tFirst Name
: "<<pro1.f_name;
cout<<"\n\n\tLast Name
: "<<pro1.l_name;
cout<<"\n\n\tGender
: "<<pro1.gen;
cout<<"\n\n\tMarital Status : "<<pro1.ms;
cout<<"\n\n\tAddress
: "<<pro1.address;
cout<<"\n\n\tCity
: "<<pro1.city;
cout<<"\n\n\tCountry
: "<<pro1.country;
cout<<"\n\n\tMobile Number : +"<<pro1.mob;
132

cout<<"\n\n\tLandline Number : +"<<pro1.land;


cout<<"\n\n\tE-Mail Address : "<<pro1.mail;
cout<<"\n\n\tOrigin
: "<<pro1.origin;
cout<<"\n\n\tDestination
: "<<pro1.dest;
cout<<"\n\n\tDate of Journey : "<<pro1.d_date;
cout<<"\n\n\tTime of Flight from "<<pro1.origin<<" to
"<<pro1.dest<<" :\n\t\tDeparture : "<<pro1.timed<<", Arrival :
"<<pro1.timedland;
cout<<"\n\n\tTrip
: "<<pro1.trip;
if(strcmpi(pro1.trip,"Return")==0)
{
cout<<"\n\n\tDate of Return Journey : "<<pro1.r_date;
cout<<"\n\n\tTime of Flight from "<<pro1.dest<<" to
"<<pro1.origin<<" :\n\t\tDeparture : "<<pro1.timer<<", Arrival :
"<<pro1.timerland;
}
cout<<"\n\n\tClass
: "<<pro1.type;
cout<<"\n\n\tFare
: INR "<<pro1.fare;
cout<<"\n\n\t\tPRESS ANY KEY TO CONTINUE....";
getch();
}
void ij()
{
clrscr();
cout<<"\n\t\t\tINDIAN JETLINES PRIVATE LIMITED";
cout<<"\n\n\t\t\tWhere Sky Is The Lower Limit...";
cout<<"\n\n\t Corporate Office : Sky Buliding, 10 Lodhi Road,
New Delhi";
cout<<"\n\n-------------------------------------------------------------------------------";
}
void bye()
{
clrscr();
cout<<"\n\n\n\n\t\t\t ***SOFTWARE DETAILS***\n";
cout<<"\n\n\n Developer
: Priyanka Mathur &
Devangshu Nath\n\n";
cout<<" Programming Language
: Turbo C++\n\n";
cout<<" Compiler version
: Borland 3.0\n\n";
cout<<" Aim
: Simulation of Air Ticket Booking
Software\n\n";
cout<<"\n\n Hope you liked it...\n\n";
cout<<"\n\n Send your comments to :
priyanka.m@gmail.com";
cout<<"\n\n
devangshu.n@gmail.com";
cout<<"\n\n\n\tThank You for Using the Program.";
cout<<"\n\n\n\n\n\tPress any key to exit........";
getch();
133

exit(0);
}
//MAIN SCREEN
void startup_menu()
{
ij();
int choice;
int x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7;
gotoxy(19,13);
cout<<"Welcome to INDIAN JETLINES E-SERVICES.";
gotoxy(19,17);
cout<<"To Proceed, Kindly Enter Your Selection.";
cout<<"\n\n\n\n\n\t\t1. TICKET BOOKING
: ";
x1=wherex();
y1=wherey();
cout<<"\n\n\t\t2. EDIT PASSENGER INFORMATION : ";
x2=wherex();
y2=wherey();
cout<<"\n\n\t\t3. SEARCH
: ";
x3=wherex();
y3=wherey();
cout<<"\n\n\t\t4. CANCEL TICKET
: ";
x4=wherex();
y4=wherey();
cout<<"\n\n\t\t5. ADMINISTRATOR REPORTS
: ";
x5=wherex();
y5=wherey();
cout<<"\n\n\t\t6. HELP
: ";
x6=wherex();
y6=wherey();
cout<<"\n\n\t\t7. EXIT
: ";
x7=wherex();
y7=wherey();
gotoxy(1,40);
cout<<"--------------------------------------------------------------------------------";
cout<<"\n\n\tPress <SPACEBAR>
To Move To Next Tab";
cout<<"\n\n\tPress <BACKSPACE>
To Move To Previous
Tab";
cout<<"\n\n\tPress <ENTER>
To Select";
bk:
gotoxy(x1,y1);
choice=getch();
if(choice==13)
book_counter();
else if(choice==32)
{
134

ei:
gotoxy(x2,y2);
choice=getch();
if(choice==13)
edit_info();
else if(choice==32)
{
ser:
gotoxy(x3,y3);
choice=getch();
if(choice==13)
search();
else if(choice==32)
{
del:
gotoxy(x4,y4);
choice=getch();
if(choice==13)
del();
else if(choice==32)
{
rep:
gotoxy(x5,y5);
choice=getch();
if(choice==13)
report();
else if(choice==32)
{
ab:
gotoxy(x6,y6);
choice=getch();
if(choice==13)
help();
else if(choice==32)
{
ex:
gotoxy(x7,y7);
choice=getch();
if(choice==13)
bye();
else if(choice==8)
goto ab;
else
goto ex;
}
else if(choice==8)
goto rep;
else
goto ab;
}
else if(choice==8)
135

goto del;
else
goto rep;
}
else if(choice==8)
goto ser;
else
goto del;
}
else if(choice==8)
goto ei;
else
goto ser;
}
else if(choice==8)
goto bk;
else
goto ei;
}
else
goto bk;
}
void main()
{
clrscr();
int choice;
textcolor(20);
textbackground(7);
cout<<"\n\n\n\n\n";
for(long x=0;x<80;x++)
{
delay(10);
cout<<"";
}
cout<<"\n\n\n\n\t
";
char string[]="WELCOME TO INDIAN JETLINES";
for(int z=0;string[z]!='\0';z++)
{
cout<<string[z]<<" ";
delay(20);
}
cout<<"\n\n\n\n\n";
for(x=0;x<80;x++)
{
delay(10);
cout<<"";
}

136

cout<<"\n\n\n\n\n\n
You have been Successfully Connected
to the INDIAN JETLINES Server..";
delay(1500);
randomize();
cout<<"\n\n\n\n\n\n\t\tYou have been Allotted Token
Number : "<<random(5553);
delay(1300);
gotoxy(26,40);
cout<<"\n\n\n\t\t\tPress Any Key To Continue...";
getch();
startup_menu();
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~

137

BIBLIOGRAPHY
The following books were referred in the
course of the program development and I
would like to acknowledge the tremendous
knowledge and help received in the
process :
Computer Science with C++
By Sumita Arora
Object-Oriented Programming with C+
+
By E Balaguruswamy

The layout of the program has been


adopted from the website :
jetairways.com

138

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