Professional Documents
Culture Documents
6th Sem Project Report
6th Sem Project Report
6th Sem Project Report
On
Submitted By:
SHUBHAM PARETA
MOHD. SUHAIL SIDDIQUI
RAM PRIT YADAV
RAKESH SINGH
PRADEEP KUMAR
2008-2009
1
CERTIFICATE
Mr. A. K. Tripathi
HOD of C.S.
(BSACET, Mathura)
GUIDED BY:
Mr. Prabhudatta Roy
2
PREFACE
3
Acknowledgement
Our project entitled “AIRLINE RESERVATION” was an uphill, climb which had to be
assign in an organized and Disciplined way to reach our target and this become possible
only due to sincere and courteous cooperation shown to us by our teacher and group
members.
There were times when we hade to in counters strange and unforeseen
circumstances, which could have very easily deterred us from goal. But the confidence,
enthusiasm and determination shown by the group are appreciable, as we stood united as
one.
It is my proud privilege to express my heartfelt gratitude and renewable
regard to for abounding and able guidance , inspiration and contractive criticism
during the tenure of the project work .
I am equally grateful to my project Guide Mr. Prabhudatta Roy
For willingness to give me valuable advice and direction me necessary facilities and
encouragement for the completion of this project .
I am highly delighted to extend my sincere thanks to Mr. A. K.
Tripathi and all other teachers of B.S.A.C.E.T. , Mathura for providing us
extra lab facility to complete my project.
SHUBHAM PARETA
MOHD. SUHAIL SIDDIQUI
RAM PRIT YADAV
RAKESH SINGH
PRADEEP KUMAR
4
INDEX
1) Introduction:
1.1) Objective
1.2) Introduction
1.3) Technologies
5
1.1) OBJECTIVE
1.2) INTRODUCTION
6
In Present age everything is growing with a
very rapid rate. So it requires that we change our
present working system for being in race of growth.
Our project helps in saving time, money, extra paper
work etc. The main advantage of our project is that
no extra software or hardware is required for this.
The main features of ATS are:
1.3) TECHNOLOGIES:
8
Primary Actors: Flight Manager
• Precondition: Flight manager is logged in
• Main Success Scenario:
– Flight manager enters all the details and clicks
the quit option.
– System displays Thank you screen and exits the
program.
• Exception Scenario:
Passenger enters invalid data.
System reenters the choices.
3)DFD
9
3.1) LEVEL 0 DFD
PASSENGER
FLIGHT
MANAGER
AIR
TICKRETING
SYSTEM
LEVEL 1 DFD
10
‘1’ Level data flow diagram shows some what
description about the ‘0’ level data flow diagram i.e.
in ‘1’ level data flow diagram we represent the descriptive
data of the ‘0’ level data flow diagram and way of
representing the relation between different actors &
different functions.
Flight
details
Passenger
Flight details
Manager Passenger
Booking
Cancellation
Quit
11
☺ New Reservation
☺ Passenger’s Information
☺ Modify Records
☺ Cancellation
☺ Quit To System
5) INPUTS :
12
Ω PASSENGER DETAILS
☺Name of Passenger
☺Sex of Passenger
☺Age of Passenger
☺Nationality
Ω MODIFICATIONS
☺Ticket No.
☺Name of Passenger
☺Sex of Passenger
☺Age of Passenger
☺Nationality
Ω CANCELLATION
☺Ticket No.
13
REQUIREMENT
HARDWARE:
• A computer system with
• 256 MB RAM
• Hard Disk 80GB
• Pentium 4
OPERATING SYSTEM:
• WINDOWS 98,2000,XP,VISTA
SOFTWARE:
14
Conclusion
This project gives a valuable help to store data into the file as raw
also helps us to work directly on the file if we want to save changes, any
In this ATS, we search the records of all the passengers and particular
passenger’s records.
Thank you
BIBLOGRAPHY
15
1. COMPLETE REFERENCE C++
2. LET US C BY YASHVANT KANETKAR
3. C++ IN DEPTH BY DEEPALI SRIVASTAVA
4. PROGRAMING IN C++ BY E –BALAGURUSWAMI
5. D.S. USING C BY G.S. BALUJA
6. SOME DATA ARE ALSO COLLECTED FROM THE INTERNET
Reference Websites:
i. www.google.com
ii. www.ask.com
iii. www.codesworld.com
16
COADING
//******************************************************
*****************
// Structure containing variables for air reservation.
//******************************************************
*****************
struct airway
{
17
char name[20], sex, from[20], rstatus[2],nat[10] ;
int passno,age,des ;
};
//*********************************************************
**************
// Class To Control All The Functions Related To Air Reservation.
//*********************************************************
**************
class air
{
private :
airway r ;
void getdata(int) ;
void add() ;
void list() ;
void pinfo() ;
void cancel() ;
void update();
void mod() ;
char select() ;
public :
//graphi();
void nik1() ;
18
void nik();
};
//************************************************************
***********
// FUNCTION NAME : NIK1
// DESCRIPTION : This function opens up the main menu and calls
other
// related functions.
//*********************************************************
**************
cprintf(" M A I N -- M E N U ") ;
gotoxy(30, 7) ;
cprintf("÷ 1 - New Reservation ÷÷");
gotoxy(30, 9) ;
cprintf("÷ 2 - Passenger Info. ÷÷");
gotoxy(30, 11) ;
19
cprintf("÷ 3 - Modify Record ÷÷") ;
gotoxy(30, 13) ;
cprintf("÷ 4 - Display Information Of Passengers ÷÷") ;
gotoxy(30, 15) ;
cprintf("÷ 5 - Cancellation ÷÷") ;
gotoxy(30, 17) ;
20
//******************************************************
*****************
// FUNCTION NAME : SELECT
// DESCRIPTION : This function opens up a sub-menu for the user
to
// select an aircraft from the list.
//******************************************************
****************
cprintf("S E L E C T A F L I G H T") ;
gotoxy(23, 6) ;
gotoxy(27, 9) ;
cprintf("1 - Air India\n") ;
gotoxy(27, 10) ;
cprintf("2 - British Airways\n") ;
gotoxy(27, 11) ;
cprintf("3 - Gulf Airways\n") ;
gotoxy(27, 12) ;
cprintf("4 - United Airlines \n") ;
gotoxy(27, 13) ;
21
cprintf("5 - Lufthansa \n") ;
gotoxy(27, 15) ;
cprintf("R - Return to Main Menu\n") ;
gotoxy(27, 16) ;
cprintf("Q - Quit to System\n") ;
gotoxy(30, 20) ;
cprintf("Enter Choice : ") ;
choice = getch() ;
choice = toupper(choice) ;
switch(choice)
{
case '1' : return(choice) ;
case '2' : return(choice) ;
case '3' : return(choice) ;
case '4' : return(choice) ;
case '5' : return(choice) ;
case 'R' : nik1() ;
case 'Q' : exit(1) ;
case 27 : nik1() ;
default : cout <<"\a" ; select() ;
}
} while(1) ;
}
22
//******************************************************
*****************
// FUNCTION NAME : GETDATA
// DESCRIPTION : Function to get Passenger Info from User for
Addition
// and Modification
//******************************************************
*****************
23
gotoxy(20,9) ;
cprintf("Enter NAME of Passenger : ") ;
gets(r.name) ;
gotoxy(20,10) ;
cprintf("Enter SEX of Passenger(M/F) : ") ;
cin>>r.sex ;
while(1)
{
gotoxy(34,12);
cout<<" ";
if(r.sex=='m'||r.sex=='M'||r.sex=='f'||r.sex=='F')
break;
gotoxy(34,12);
cout<<"ENTER M OR F"<<endl;
getch();
gotoxy(34,12);
cout<<" ";
gotoxy(20,10) ;
cout << " ";
gotoxy(20,10);
cprintf("Enter SEX of Passenger : ") ;
cin>>r.sex ;
24
}
gotoxy(20,11) ;
cprintf("Enter AGE of Passenger : ") ;
cin>>r.age ;
while(1)
{
gotoxy(34,12);
cout<<" ";
gotoxy(34,12);
cout << "Enter Correct age";
getch();
gotoxy(34,12);
cout<<" ";
gotoxy(20,11) ;
cout << " ";
gotoxy(20,11) ;
cprintf("Enter AGE of Passenger : ") ;
cin >> r.age ;
25
}
gotoxy(20,12);
cprintf("ENTER THE NATIONALITY :");
gets(r.nat);
gotoxy(20,13);
cprintf("STARTING POINT : ") ;
cout<<" DELHI\n";
gotoxy(20,14) ;
cprintf(" DESTINATION : ") ;
switch(r.des)
{
case 1:
cout<<" LONDON\n";
break;
case 2:
cout<<" NEW YORK\n";
break;
case 3:
cout<<" PARIS\n";
break;
case 4:
cout<<" SWITZERLAND\n";
break;
}
gotoxy(20,16) ;
cprintf("TICKET NO. : ") ;
26
cout << r.passno ;
}
//*********************************************************
**************
// FUNCTION NAME : ADD
// DESCRIPTION : Function to add the data provided from
GETDATA into
// the required file.
//*********************************************************
**************
27
case '4' : strcpy(filename,"Unit.Dat") ; break ;
case '5' : strcpy(filename,"Luf.Dat") ; break ;
}
airs.open(filename, ios::in | ios::binary | ios::app) ;
while(airs.read((char *)&temp, sizeof(airway)))
t++ ;
airs.close() ;
do
{
if (t < 5)
strcpy(r.rstatus, "C") ;
else strcpy(r.rstatus, "W") ;
if(t<8)
{
t++ ;
clrscr() ;
gotoxy(25,3) ;
cprintf("ADDITION OF NEW PASSENGER") ;
gotoxy(23,4) ;
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ") ;
gotoxy(20,6) ;
28
case '2': cout <<"British Airways" ; break ;
case '3': cout <<"Gulf Airways" ; break ;
case '4': cout <<"United Airlines" ; break ;
case '5': cout <<"Lufthansa" ; break ;
}
getdata(t) ;
gotoxy(20,16) ;
cprintf("STATUS : ") ;
if (t <5)
cout <<"\aCONFIRMED" ;
else cout <<"\aWAITING LIST";
getch() ;
airs.open(filename, ios::out | ios::binary | ios::app) ;
airs.write((char *)&r, sizeof(airway)) ;
airs.close() ;
}
else
{
clrscr() ;
gotoxy(22,20) ;
cout <<"NO MORE TICKETS AVAILABLE FOR THIS
Flight\a" ;
getch() ;
}
gotoxy(12,25) ;
cout <<"\aDo you wish to make any more reservation on this
Flight (Y/N)" ;
do
29
{
choice1 = getch() ;
choice1 = toupper(choice1) ;
} while((choice1 != 'Y') && (choice1 != 'N')) ;
} while(choice1 == 'Y') ;
gotoxy(1,25) ;
clreol() ;
gotoxy(12,25) ;
cout << "Do you wish to make any more reservation on
any Flight (Y/N)" ;
do
{
choice2 = getch() ;
choice2 = toupper(choice2) ;
} while((choice2 != 'Y') && (choice2 != 'N')) ;
} while(choice2 == 'Y') ;
//******************************************************
*****************
// FUNCTION NAME : PINFO
30
// DESCRIPTION : Function to get full details of a particular
Passenger
//******************************************************
*****************
31
if(p>k)
{
clrscr() ;
gotoxy(25,25) ;
cout <<"Record Not Found......\a" ;
getch() ;
}
else
{
airs.open(filename, ios::in | ios::binary | ios::app) ;
while(airs.read((char *)&r, sizeof(airway)))
{
if (r.passno == p)
{
clrscr() ;
gotoxy(27,3) ;
cprintf("PASSENGER INFORMATION") ;
gotoxy(23,6) ;
32
case '4': cout <<"United Airlines" ; break ;
case '5': cout <<"Lufthansa" ; break ;
}
gotoxy(23,7) ;
cprintf("Passenger No. : ") ;
cout <<r.passno ;
gotoxy(23,9) ;
cprintf("NAME of Passenger : ") ;
cout <<r.name ;
gotoxy(23,10) ;
cprintf("SEX of Passenger : ") ;
cout <<r.sex ;
gotoxy(23,11) ;
cprintf("AGE of Passenger : ") ;
cout <<r.age ;
gotoxy(23,12);
cprintf("NATIONALITY : ");
cout<<r.nat;
gotoxy(23,13) ;
cprintf("STARTING POINT : ") ;
cout <<"DELHI" ;
gotoxy(23,14) ;
cprintf("DESTINATION : ") ;
switch(r.des)
{
case 1:
cout<<"LONDON\n";
33
break;
case 2:
cout<<"NEW YORK\n";
break;
case 3:
cout<<"PARIS\n";
break;
case 4:
cout<<"SWITZERLAND\n";
break;
}
gotoxy(23,16) ;
cprintf("TICKET NO. : ") ;
cout <<r.passno ;
gotoxy(23,17) ;
cprintf("STATUS : ") ;
if(strcmp(r.rstatus, "W") == 0)
cout <<"WAITING LIST" ;
else cout <<"CONFIRMED" ;
gotoxy(5,25) ;
cout <<"Press Any Key To Continue........" ;
getch() ;
}
}
airs.close() ;
}
}
34
//******************************************************
*****************
// FUNCTION NAME : LIST
// DESCRIPTION : Function to show passenger list flight wise.
//******************************************************
*****************
gotoxy(29,3) ;
cprintf("P A S S E N G E R L I S T") ;
gotoxy(27,4) ;
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ") ;
gotoxy(33,5) ;
35
switch(c)
{
case '1': cprintf("AIR INDIA") ; break ;
case '2': cprintf("BRITISH AIRWAYS") ; break ;
case '3': cprintf("GULF AIRWAYS") ; break ;
case '4': cprintf("UNITED AIRLINES") ; break ;
case '5': cprintf("LUFTHANSA") ; break ;
}
gotoxy(3,7) ;
cprintf(" Passenger Number ") ;
gotoxy(27,7) ;
cprintf(" P A S S E N G E R - N A M E ") ;
gotoxy(62,7) ;
cprintf(" Reservation Status") ;
int i = 9 ;
airs.open (filename, ios::in | ios::binary) ;
while(airs.read((char *)&r, sizeof(airway)))
{
gotoxy(10,i) ;
cout <<r.passno ;
gotoxy(30,i) ;
cout <<r.name ;
gotoxy(66,i) ;
if (strcmp(r.rstatus, "C") == 0)
cout <<"CONFIRMED" ;
36
else
cout <<"WAITING LIST" ;
i++ ;
}
gotoxy(25,25) ;
cprintf("\aPress Any Key To Continue..............") ;
getch() ;
airs.close() ;
}
//******************************************************
*****************
// FUNCTION NAME : MOD
// DESCRIPTION : Function to get modify ticket details entered
during
// reservation.
//******************************************************
*****************
37
//******************************************************
*****************
// FUNCTION NAME : CANCEL
// DESCRIPTION : Function to cancel a ticket.
//******************************************************
*****************
38
}
airs.close();
if(p>k)
{
clrscr();
gotoxy (25,24);
cout<<"\aPASSENGER NUMBER DOES NOT EXIST";
getch();
return;
}
clrscr() ;
gotoxy(25,3) ;
cprintf(" CANCELLATION OF TICKET ") ;
airs.open(filename, ios::in | ios::binary) ;
airs1.open("Temp.Dat", ios::out | ios::binary) ;
while (airs.read((char *)&r, sizeof(airway)))
{
if (r.passno > p)
{
r.passno-- ;
airs1.write((char *)&r, sizeof(airway)) ;
}
else if (r.passno < p)
airs1.write((char *)&r, sizeof(airway)) ;
}
airs.close() ;
airs1.close() ;
39
remove(filename) ;
rename("Temp.Dat", filename) ;
clrscr() ;
gotoxy(25,24) ;
cout <<"\a Ticket Successfully Cancelled......" ;
getch() ;
}
//******************************************************
*****************
// FUNCTION NAME : UPDATE
// DESCRIPTION : Function to update a ticket.
40
//******************************************************
*****************
if(p>k)
41
{
clrscr();
gotoxy (25,24);
cout<<"\aPASSENGER NUMBER DOES NOT
EXIST";
getch();
return;
}
clrscr() ;
gotoxy(25,3) ;
cprintf(" CANCELLATION OF TICKET ") ;
airs.open(filename, ios::in | ios::binary) ;
airs1.open("Temp.Dat", ios::out | ios::binary) ;
while (airs.read((char *)&r, sizeof(airway)))
{
if (r.passno > p)
{
r.passno-- ;
airs1.write((char *)&r, sizeof(airway)) ;
}
else if (r.passno < p)
airs1.write((char *)&r, sizeof(airway)) ;
}
airs.close() ;
airs1.close() ;
remove(filename) ;
rename("Temp.Dat", filename) ;
42
airs.open(filename, ios::in | ios::binary) ;
airs1.open("Temp.Dat", ios::out | ios::binary) ;
while (airs.read((char *)&r, sizeof(airway)))
{
if (r.passno <= 5)
strcpy(r.rstatus, "C") ;
else
strcpy(r.rstatus, "W") ;
airs1.write((char *)&r, sizeof(airway)) ;
}
airs.close() ;
airs1.close() ;
remove(filename) ;
rename("Temp.Dat", filename) ;
clrscr() ;
gotoxy(15,12) ;
cout <<"\a Press Enter to update the record......" ;
getch() ;
}
//******************************************************
******************
// Main Function
//******************************************************
******************
void main()
{
43
air obj ;
obj.nik();
clrscr();
obj.nik1() ;
char msg[33];
int gd=DETECT,gm,x1,x2,y1,y,y2,s=30,j,w,S,stangle;
int i,r;
//int dly=160,dly1=30;//110 40
initgraph(&gd,&gm,"c:\\tc\\bgi");
setcolor(15);
line (320-150,320-13,320+150,320-13);
line (320-150,320+12,320+150,320+12);
line (320-150,320-13,320-150,320+12);
line (320+150,320+12,320+150,320-13);
gotoxy(20,23);
printf("LOADING . . .");
for
( x1=171,x2=171,y1=308,y2=331,y=1,S=0;x1<470;x1++,x2++,y++,S++
)
{
44
setcolor(4);
line (x1,y1,x2,y2);
w=(x1-169)/3;
for ( j=34; j<=78; j++)
{
gotoxy(j,23) ;
printf(" ");
}
gotoxy(34,23);
printf("%d%",w);
if (x2>270) s=45; if (x2>370) s=10;
if (x2==320)
delay(999);
else
delay(s);
}
delay(800);
for (j=27; j<=78; j++)
{
gotoxy(j,23) ;
printf(" ") ;
}
gotoxy(28,23);
printf("COMPLETED");
gotoxy(20,25);
//clrscr();
cleardevice();
45
/* End of First Griphics Portion */
for (i=1;i<=10;i++)
{
if(i==7)
continue;
else
{
setcolor(i);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(40,120);
outtext("PROJECT");
delay(300);
// clrscr();
cleardevice();
}
}
for ( i=1;i<7;i++)
{
setcolor(i);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(120,150);
outtext("ON C++ ");
delay(300);
//clrscr();
cleardevice();
}
46
for ( i=3;i<=9;i++)
{
if(i==7)
continue;
else
{
setcolor(i);
settextstyle( TRIPLEX_FONT, HORIZ_DIR, i);
moveto(40,120);
outtext("Developed");
delay(250);
//clrscr();
cleardevice();
}
}
for ( i=1;i<=10;i++)
{if(i==7)
continue;
else
{
setcolor(i);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(230,160);
outtext("BY:-");
delay(250);
47
//clrscr();
cleardevice();
}
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(50,120);
outtext("MOHD. SUHAIL SIDDIQUI");
delay((i*2)*80);
//clrscr();
cleardevice();
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("SHUBHAM PARETA");
delay(i*200);
//clrscr();
cleardevice();
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
48
outtext("RAM PRIT YADAV");
delay(i*500);
//clrscr();
cleardevice();
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("RAKESH SINGH");
delay(i*500);
//clrscr();
cleardevice();
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("PRADEEP KUMAR");
delay(i*500);
//clrscr();
cleardevice();
}
for(i=1;i<=20;i++)
{
49
setbkcolor(0);
setcolor(8);
settextstyle(6,0,5);
settextjustify(1,1);
setcolor(5);
outtextxy(325,110,"PROJECT");
delay(250);
outtextxy(320,170,"AIRLINE RESERVATION");
delay(250);
settextstyle(4,0,4);
setcolor(20);
outtextxy(320,220,"Guided By:-");
delay(450);
setcolor(30);
outtextxy(320,300,"Mr.Rajesh Singh");
setcolor(3);
delay(4000);
cleardevice();
break;
}
setbkcolor(0);
setcolor(8);
ellipse(320,240,0,390,310,150);
settextstyle(8,0,4);
settextjustify(1,1);
setcolor(5);
outtextxy(325,110,"PROJECT");
delay(450);
50
outtextxy(320,170,"AIRLINE RESERVATION");
delay(450);
settextstyle(4,0,4);
setcolor(20);
outtextxy(320,200,"Presented By:");
delay(450);
outtextxy(320,305,"Mohd. Suhail Siddiqui");
settextstyle(8,0,4);
setcolor(3);
delay(450);
outtextxy(320,235,"Shubham Pareta");
outtextxy(320,275,"Ram Prit Yadav");
outtextxy(320,340,"Rakesh Singh");
outtextxy(320,365,"Pradeep Kumar");
while(kbhit()==0){
for (stangle=0;!kbhit();stangle++)
{
setcolor(7);
ellipse(320,240,stangle,stangle+20,310,150);
ellipse(320,240,stangle+180,stangle+200,310,150);
delay(6);
setcolor(8);
ellipse(320,240,stangle-1,stangle+19,310,150);
ellipse(320,240,stangle-1+180,stangle+199,310,150);
// getch();
51
} }
delay(500);
getch();
cleardevice();
closegraph();
clrscr();
}
SCREEN LEYUT
52
53
54
55