Sie sind auf Seite 1von 101

ON

AIR LINE RESERVATION


SUBMITTED FOR

PARTIAL FUFILLMENT OF BACHELOR OF


COMPUTER APPLICATION

UNDER THE SUPERVISION OF SUBMITTED BY:

MRS. UMA DEVI DEEPIKA LUTHRA


SR. FACULTY ENROL NO. : 07031240004
SOFTDOT HI-TECH EDUCATIONAL
& TRAINING INSTITUTE

Directorate of Distance Education


Guru Jambheshwar University of
Science and Technology,
Hisar 125001

1
PREFACE

This project report is submitted for the partial


fulfillment of B.C.A. degree form SOFTDOT HI-TECH
INSTITUTE (Affiliated: GURU JAMBHESHWAR
UNIVERSITY OF SCIENCE AND TECHNOLOGY,
HISAR-HARYANA, INDIA)

This project report document the AIR LINE


RESERVATION SYSTEM. This is comprehensive
application software that maintains all detail of the
customer and provides information to the customer
according to their requirement

While developing this project, I was involved with


system analysis and system design process. This is a
simple report describing in detail various aspects of the
system. I have used Data flow diagram for designing.

2
CERTIFICATE

This is to certify that Ms. Deepika Luthra, Enrollment


Number-07031240004, has worked under my supervision
to prepare his project report on “AIR LINE
RESERVATION SYSTEM”. The work embodied in
this report is original and was conducted at SOFTDOT
HI-TECH EDUCATIONAL & TRAINING
INSTITIUTE form. The work has not been submitted
in part or full to this or any other university for the
award of any degree or diploma. He has completed all
requirement of Bachelor of Computer Application
ordinance.

Signature of supervision
Name: Mrs. Uma Devi

………………………..
Designation: Sr. Faculty

Organization: SOFTDOT HI-TECH


EDUCATIONAL &TRANING
INSTITUTE

3
STUDENT
DECLARATION

I here by declare that the project report


entitled

“AIR LINE RESERVATION SYSTEM”

Submitted in partial fulfillment of


requirement for the degree of Bachelor of
Computer Application to Guru
Jambheshwar University, this is my
original work and not submitted for the
award of any other degree, diploma,
fellowship, or any other similar title or
prizes.

Place: New Delhi


DEEPIKA LUTHRA

4
ENROL
NO : 07031240004

ACKNOWLEDGEMENT

Nothing concrete can be achieved without an optimal


combination of inspiration and perspiration. No work
can be accomplished without taking the guidance of the
experts. It is only the critiques from ingenious
intellectuals that help transform a product into a
quality product. For this, I would like to thank Mrs.
Uma Devi, lecturer.
SOFTDOT HI-TECH EDUCATIONAL & TRAINING
INSTITUTE, New Delhi and all of the faculty members
for having given me an opportunity to work under their
guidance. I am grateful for their continuous support
and precious time.

It has been good to work on this project and a great


experience in itself.

DEEPIKA LUTHRA
Enrollment No. : 07031240004

5
INDEX

Certificate

Declaration

Acknowledgement

1) Abstraction

2) Introduction

3) Objectives

4) System Analysis

5) System Design

6) Use case diagram

7) Data flow diagram

8) Features

9) Conclusion

10) Feasibility Study

6
11) Coding

12) Testing

13) Screen Layout

14) Bibliography

15) References

16) Implementation

17) System Requirements

18) Some intro of C++

19) Definitions of C++

20) Suggestions

21) Notes

7
ABSTRACTION

8
ABSTRACT

My project called “AIR LINE RESERVATION

SYSYEM” is highly professionalized and can keep

record of all tickets. By using the techniques of visual


basic 6.0

the project was given an excellent outlook for easy

understanding and working. This software is capable of

holding number of records. Store Customers

information and modification of the existing details.

9
OBJECTIVES

10
OBJECTIVE

This project is a simple and abstract version of the

modern day Air Ticketing System. This is meant for the

use of the staff to handle all the necessary information

regarding the different flights from the airport. This

program includes the functions to add flight records,

book flights individually or in a group. Cancellation

and display flight status, cancellation of tickets and

displaying the same.

11
• Investigating the new problems, which occur during the
project development.

• Apply all concepts of s/w engineering i.e. the process of


development of project.

• Design and implement major component of s/w framework


including database and front-end application modules.

• Development and integrate different module created


modules created and test the completed application.

• Reusability of legally system as web

• Smother interdepartmental integration

• Increased and faster reach.

ISSUES: -

1. Standardization: - Standardization is an important part of


many data mining and data discovery processes.
Standardization arises because certain objects may have
many different textual strings or names associated with
them.

2. User interfaces availability: - Unified user interface


development has been introduced with the objective of
supporting platform and user independent interface
development.

12
Who should use the project (work of a project)?

It is a project, which is for use by the different reservation

department who has to maintain the information of each

passenger. It shows the name, age, sex, nationality and ticket

no. of the passenger. The tedious paper work of entering the

details of each passenger is all ended, and maintained by this

program.

13
INTRODUCTION

14
INTRODUCTION

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. ATS allows the flight manager to find all the


flight meeting passenger’s needs.

2. ATS allows the travel agent to make


reservations.

3. ATS allows the travel agent to cancel the


reservation.

15
It has various options for reserving tickets of various

passengers in the flight, with their name, age, sex, ticket no. and

nationality. The easy to use interface and fast computation

makes it user friendly and outputs accurate calculations. The

records thus stored for each passenger then can be easily

searched by their ticket no. and then the whole information

generates of that passenger. Well organized structure and

design of the program makes it easy for even a novice user to

input data easily and maintain accurate information of the

passengers. The records which are not required can also be

deleted or edited for proper maintenance of the system.

16
SYSTEM
ANALYSIS

17
System Analysis

A system is a set or arrangement of functionally


dependent components interactively working
together to attain a predefined goal by processing
information.

Analysis is the process of diagnosing situations, done


with a defiant aim, with the boundaries of the system
kept in mind to produce a report based on the
findings.

This is the most important step in a software project


where we get a general idea about the needs of the
customers or end users by having man to man
conversation with them and about the various
conditions and restrictions that have to be taken care
of while developing the software application.

System analysis was conducted with the following


objectives in mind:

1. Identification of need

2. Information Gathering

3. Evaluate the system concept of feasibility

18
1. Identification of Need

The success of the system depends largely on how


accurately a problem is defined, thoroughly
investigated, and properly carried out through the
choice of solution. Uses need identification and
analysis re concerned with what the user needs
rather then what he/she wants. Until the problem
has been identified, defined and evaluated the
analyst shouldn’t think about solutions and whether
the problem is worth solving or not. This step is
intended to help the user and the analyst understand
the real problem rather than its symptoms.

2. Information Gathering

A key part of system development is gathering


information. The analyst
Must know what information to get, where to find it,
how to collect it,
And how to make use of it. The proper use of tools for
gathering
Information is the key to accessible analysis.

19
3. Feasibility Study

Feasibility study is carried out to test if the proposed


system is feasible in terms of economy, technology,
resource availability etc. As such, given unlimited
resources and infinite time, all projects are feasible.
Unfortunately, such results and time are not possible in
real life situations.

Hence it is both necessary and prudent the evaluate


the feasibility of the project at the earliest possible time
in order to avoid unnecessary wastage of time, effort,
and professional embarrassment of over an ill
conceived system. Feasibility study is a test of the
system proposed regarding its workability, impact on
the organization ability to meet the user’s need and
effective use of resources.

20
SYSTEM DESIGN

21
SYSTEM DESIGN

System design is a solution, a “HOW TO


APPROACH” to the creation of a new system. This
important phase is composed of several steps. It
provides the understanding and procedural details
to implements the system. Design goes through a
logical and physical stage of the progress. Logical
design reviews the present physical system, prepares
input/output specifications, makes audit security and
control specifications, detailed implementation
plans, and prepares the logical design walkthrough.
The physical design makes out the details of the
physical system, plans the system implementation
and specifies any new hardware and software
products.

System design is a highly creative process, which can


be greatly facilitated by the Strong problem
definition. Pictorial description of the existing
systems. Set of requirements of the new systems.

22
CASE DIAGRAM

23
USE CASE DIAGRAM

Use Case 1: Flight Details


Primary Actors: Flight Manager
• Precondition: :Flight manager is logged in
• Main Success Scenario:
– User enters flight details
– System accepts flight details

Use Case 2: Passenger Details


• Primary Actors: Flight Manager
• Precondition: Flight manager is logged in
• Main Success Scenario:
– User enters passenger details
– System accepts passenger details

Use Case 3: Booking


• Primary Actors: Flight Manager
• Precondition: Flight manager is logged in
• Main Success Scenario:
– User enters booking details

24
Use Case 4: Cancellation

• Primary Actors: Flight Manager


• Precondition: Flight manager is logged in
• Main Success Scenario:
– User cancels the passenger’s details
– System updates the details in question

Use Case 5: Quit

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

System accepts these details

25
DATA FLOW
DIAGRAM

26
DFD

LEVEL “0” DFD

 The central process is all functions and features of


our Air ticketing system, depicted as a single
bubble.

 Four primary external entities that affect


information flow(labeled on arrows) are-flight
manager and passengers.

 The Flight manager can enter, modify and cancel


all the details as given by the passenger.

 He is also responsible for inputting the database


field/attribute values.

 Passenger gives the required details to the flight


manager to be entered in the system.

27
LEVEL 1 DFD

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

28
“ER” DIAGRAM

Flight
details

Flight
Passe
nger Passeng
Manag er
er details
Booki
ng

Cancell
ation

Quit

4) FUNCTIONALITY & FEATURES:-

29
☺ New Reservation

☺ Passenger’s Information

☺ Modify Records

☺ Display Information of Passengers

☺ Cancellation

☺ Quit To System

INPUTS

30
Ω PASSENGER DETAILS
☺Name of Passenger
☺Sex of Passenger
☺Age of Passenger
☺Nationality

Ω MODIFICATIONS

☺Ticket No
☺Name of Passenger
☺Sex of Passenge
☺Age of Passenger
☺Nationality

Ω CANCELLATION
☺Ticket No.

31
SYSTEM
REQUIREMENTS

32
REQUIREMENTS

Before proceeding to the project details it is


necessary to give a brief description of H/W machine on
which the entire work is done. It was IBM PC
computable machine with a Pentium 4 processor, and
104 keys of keyboard
Other description is given bellow:

HARDWARE:

• A computer system with


• 256 MB RAM
• Hard Disk 80GB
• Pentium 4

OPERATING SYSTEM:
• WINDOWS 98, 2000.
• WINDOWS XP, VISTA.

SOFTWARE:

• Turbo C++ LANGUAGE

33
CONCLUSION

34
CONCLUSION

This project gives a valuable help to store data into

the file as raw data. It perform all type of work related

to air reservation environment. It also helps us to work

directly on the file if we want to save changes, any

record or the contents of records.

In this ATS, we search the records of all the passengers

and particular passenger’s records.

35
FEASIBILITY
STDUY

36
FEASIBILITY STUDY

The prime focus of the feasibility study is evaluating the


practicality of the proposed system keeping in mind a
number of factors. All the system will be termed as
feasible if given unlimited resources and infinite time,
but development of a computer-based system is more
likely to be plagued by scarcity of resources and have a
tight delivery schedule. The efforts and resources spent
in developing the system will be a waste if the end
solution does not offer timely and satisfactory solution
to its users. Feasibility study is a test of system
proposed regarding workability, impact on the
organization ability to meet user needs, and effective
use of resources. Thus, when a new application is
proposed, it normally goes through a feasibility study
before it is approved for development. A key part of
feasibility analysis is gathering information about the
present system. The proper use of tools for gathering
information is the key to successful analysis.

37
TECHNICAL FEASIBILITY

During the technical feasibility studies following issues


are taken into consideration
Whether the required technology is available or not?
Required resources are available or not? (Manpower,
programmer, software and hardware etc)

A study of resource availability may affect the


ability to achieve an acceptable system. The technical
feasibility is frequently the most difficult area to ensure
at this stage. Because objective, performance, functions
are somewhat hazy, anything seems possible if the right
assumptions are made. It is essential that the process of
analysis and definition be conducted in parallel with an
assessment of technical feasibility. The consideration
that is normally associated with technical feasibility
includes resource availability of the organization where
the project is to be developed and implemented.

38
ECONOMICAL FEASIBILITY

A system that can be developed


technically and that will be used if
installed must still be profitable for
organization. For any system if the
expected benefits equal or exceed the
expected costs, the system can be judged
to be economically feasible. In economic
feasibility, cost benefit analysis is done
in which expected costs and benefits are
evaluated.

Economic analysis effectiveness of the


proposed system. In economic is used for
evaluating the feasibility, the most
important is cost benefit analysis.

39
MY PROJECT IS-:

Our project is technically feasible as it


is made in C++ Programming language,
which is a very popular programming
language and well researched, by using
all its features we can able to fulfill all
the requirement of the proposed project
with its help. It is platform independent.

COST – BENEFIT
ANALYSIS
Developing an IT application is an
investment. Since, after developing that
application it provides the organization
with profits. Profits can be monetary or in
the form of an improved working
environment.

40
DATA DICTIONARY

Certain values like array size used in Classes for storing the records by the user
are suppose to have the same length throughout the program. A variable Log is
a global variable, which is used to store the level of user at the time of login.
With the help of this variable software decides that how much access should be
given to a particular user.

Explanation related to Classes used in the software

1. Member: - The class “Member” is used to store the records of a member


of the sports club. The class has all the variables used to store the
personal details of a member, which are required to fulfill all the details as
per requirement of sports club.

Variables used in the Class “Member”

Name of Variable Data Type Size Information Stored In Variable

Add Char Array 10 To Store the Address


place Char Array 20 To Store the roll place
City Char Array 20 To Store the City
Telno Char Array 9 To Store the Telephone Number
Gender Char Array 2 To Store the Gender
Roll Char Array 5 To Store the Name of 3 Games
Occ Char Array 20 To Store the roll number
Rem Char Array 30 To Store the student remarks
Grade Char Array 2 To Store the grade
Or Char Array 6 To Store the overall record
Eng Integer To Store the marks in English
Math Integer To Store maths
Phy Integer To Store the marks in physics
Chem. Integer To Store the marks in chemistry
Comp Integer To Store the marks in computer
ob Integer To Store the total scored

41
CODING

42
CODING

//PROJECT ON AIR LINE RESERVATION


//******************************************************
*****************
// Required Header files
//******************************************************
*****************
#include <graphics.h>
#include <ctype.h>
#include <iomanip.h>
#include <conio.h>
#include <fstream.h>
#include <string.h>
#include <process.h>
#include <stdio.h>
#include <dos.h>

//******************************************************
*****************
// Structure containing variables for air reservation.
//******************************************************
*****************

struct airway

43
{
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();

44
void nik1() ;
void nik();

};

//************************************************************
***********
// FUNCTION NAME : NIK1
// DESCRIPTION : This function opens up the main menu and
calls other
// related functions.
//*********************************************************
**************

void air :: nik1()


{
//graphi();
do
{
clrscr() ;
char choice ;
gotoxy(30, 2) ;

cprintf(" M A I N -- M E N U ") ;

gotoxy(30, 7) ;
cprintf("÷ 1 - New Reservation ÷÷");
gotoxy(30, 9) ;
cprintf("÷ 2 - Passenger Info. ÷÷");

45
gotoxy(30, 11) ;
cprintf("÷ 3 - Modify Record ÷÷") ;
gotoxy(30, 13) ;
cprintf("÷ 4 - Display Information Of Passengers ÷÷") ;
gotoxy(30, 15) ;
cprintf("÷ 5 - Cancellation ÷÷") ;
gotoxy(30, 17) ;

cprintf("÷ 0 - Quit To System ÷÷") ;


gotoxy(34, 22) ;

cprintf("ENTER CHOICE : ") ;


choice = getch() ;
choice = toupper(choice) ;
switch(choice)
{
case '1' : add() ; break ;
case '3' : mod() ; break ;
case '5' : cancel() ; break ;
case '4' : list() ; break ;
case '2' : pinfo() ; break ;
case '0' : exit(1) ;
case 27 : exit(1) ;
default : cout <<"\a" ;
}
} while(1) ;
}

46
//******************************************************
*****************
// FUNCTION NAME : SELECT
// DESCRIPTION : This function opens up a sub-menu for the
user to
// select an aircraft from the list.
//******************************************************
****************

char air :: select()


{
char choice ;
do
{
clrscr() ;
gotoxy(25, 5) ;

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

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

48
//******************************************************
*****************
// FUNCTION NAME : GETDATA
// DESCRIPTION : Function to get Passenger Info from User
for Addition
// and Modification
//******************************************************
*****************

void air :: getdata(int p)


{
fstream joel ;
// r.passno = p ;
char ch;

cout<<" THE ROUTES ARE\n";


cout<<" 1. DELHI - LONDON - DELHI\n" ;
cout<<" 2. DELHI - NEY YORK - DELHI\n";
cout<<" 3. DELHI - PARIS - DELHI\n";
cout<<" 4. DELHI - SWITZERLAND - DELHI\n\n";
cout<<" Please Select Your Route: ";
cin>>r.des;
clrscr();
r.passno = p ;
gotoxy(20,7) ;
cprintf("Passenger No. : ") ;
cout <<r.passno ;

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

50
}

gotoxy(20,11) ;
cprintf("Enter AGE of Passenger : ") ;
cin>>r.age ;

while(1)
{
gotoxy(34,12);
cout<<" ";

if(r.age>=4 && r.age<=100 )


break;

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 ;

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

52
cout << r.passno ;
}

//*********************************************************
**************
// FUNCTION NAME : ADD
// DESCRIPTION : Function to add the data provided from
GETDATA into
// the required file.

//*********************************************************
**************

void air :: add()


{
air temp ;
int t ;
fstream airs ;
char c, filename[8], choice1, choice2 ;
do
{
t=0;
c = select() ;
switch(c)
{
case '1' : strcpy(filename,"Ind.Dat") ; break ;
case '2' : strcpy(filename,"Brit.Dat") ; break ;
case '3' : strcpy(filename,"Gulf.Dat") ; break ;
case '4' : strcpy(filename,"Unit.Dat") ; break ;

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

cprintf("Flight Name : ") ;


switch(c)
{
case '1': cout <<"Air India" ; break ;
case '2': cout <<"British Airways" ; break ;

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

55
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
// DESCRIPTION : Function to get full details of a particular
Passenger

56
//******************************************************
*****************

void air :: pinfo()


{
fstream airs ;
int p , k=0;
char c, filename[8] ;
c = select() ;
switch(c)
{
case '1' : strcpy(filename,"Ind.Dat") ; break ;
case '2' : strcpy(filename,"Brit.Dat") ; break ;
case '3' : strcpy(filename,"Gulf.Dat") ; break ;
case '4' : strcpy(filename,"Unit.Dat") ; break ;
case '5' : strcpy(filename,"Luf.Dat") ; break ;
}
clrscr() ;
gotoxy(10,3) ;
cout <<"Enter Passenger Number : " ;
cin >>p ;
airs.open(filename, ios::in | ios::binary | ios::app) ;
while(airs.read((char *)&r, sizeof(airway)))
{
k++;
}
airs.close();
if(p>k)

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

cprintf("Flight Name : ") ;


switch(c)
{
case '1': cout <<"Air India" ; break ;
case '2': cout <<"British Airways" ; break ;
case '3': cout <<"Gulf Airways" ; break ;
case '4': cout <<"United Airlines" ; break ;
case '5': cout <<"Lufthansa" ; break ;

58
}
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";
break;
case 2:

59
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() ;
}
}

60
//******************************************************
*****************
// FUNCTION NAME : LIST
// DESCRIPTION : Function to show passenger list flight wise.
//******************************************************
*****************

void air :: list()


{
fstream airs ;
char c, filename[8] ;
c = select() ;
switch(c)
{
case '1' : strcpy(filename,"Ind.Dat") ; break ;
case '2' : strcpy(filename,"Brit.Dat") ; break ;
case '3' : strcpy(filename,"Gulf.Dat") ; break ;
case '4' : strcpy(filename,"Unit.Dat") ; break ;
case '5' : strcpy(filename,"Luf.Dat") ; break ;
}
clrscr() ;

gotoxy(29,3) ;
cprintf("P A S S E N G E R L I S T") ;

gotoxy(27,4) ;
cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ") ;
gotoxy(33,5) ;
switch(c)

61
{
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" ;
else

62
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.
//******************************************************
*****************

void air :: mod()


{ update();
add();
getch() ;
}

//******************************************************
*****************

63
// FUNCTION NAME : CANCEL
// DESCRIPTION : Function to cancel a ticket.
//******************************************************
*****************

void air :: cancel()


{
fstream airs, airs1 ;
int p,k=0 ;
char c, filename[8] ;
c = select() ;
switch(c)
{
case '1' : strcpy(filename,"Ind.Dat") ; break ;
case '2' : strcpy(filename,"Brit.Dat") ; break ;
case '3' : strcpy(filename,"Gulf.Dat") ; break ;
case '4' : strcpy(filename,"Unit.Dat") ; break ;
case '5' : strcpy(filename,"Luf.Dat") ; break ;
}
clrscr() ;
gotoxy(10,3) ;
cout <<"Enter Passenger Number : " ;
cin >>p ;
airs.open(filename, ios::in | ios::binary | ios::app) ;
while (airs.read((char *)&r, sizeof(airway)))
{
k++ ;
}
airs.close();

64
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() ;
remove(filename) ;

65
rename("Temp.Dat", filename) ;

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(25,24) ;
cout <<"\a Ticket Successfully Cancelled......" ;
getch() ;
}

//******************************************************
*****************
// FUNCTION NAME : UPDATE
// DESCRIPTION : Function to update a ticket.
//******************************************************
*****************

66
void air :: update()
{
fstream airs, airs1 ;
int p,k=0 ;
char c, filename[8] ;
c = select() ;
switch(c)
{
case '1' : strcpy(filename,"Ind.Dat") ; break ;
case '2' : strcpy(filename,"Brit.Dat") ; break ;
case '3' : strcpy(filename,"Gulf.Dat") ; break ;
case '4' : strcpy(filename,"Unit.Dat") ; break ;
case '5' : strcpy(filename,"Luf.Dat") ; break ;
}
clrscr() ;
gotoxy(10,3) ;
cout <<"Enter Passenger Number : " ;
cin >>p ;
airs.open(filename, ios::in | ios::binary | ios::app) ;
while (airs.read((char *)&r, sizeof(airway)))
{
k++ ;
}
airs.close();

if(p>k)
{
clrscr();

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

airs.open(filename, ios::in | ios::binary) ;


airs1.open("Temp.Dat", ios::out | ios::binary) ;

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

air obj ;

69
obj.nik();
clrscr();
obj.nik1() ;

void air:: nik()


{

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++)
{
setcolor(4);
line (x1,y1,x2,y2);
w=(x1-169)/3;

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

/* End of First Griphics Portion */

for (i=1;i<=10;i++)

71
{
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();
}
for ( i=3;i<=9;i++)
{
if(i==7)

72
continue;
else
{

setcolor(i);
settextstyle( TRIPLEX_FONT, HORIZ_DIR, i);
moveto(40,120);
outtext("Developed");
delay(250);
//clrscr();
cleardevice();
}
}

/* End of Second Graphics Portion */

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);
//clrscr();
cleardevice();
}

73
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(50,120);
outtext("DEEPIKA LUTHRA");
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("DEEPIKA LUTHRA");
delay(i*200);
//clrscr();
cleardevice();
}
for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("DEEPIKA LUTHRA");
delay(i*500);
//clrscr();

74
cleardevice();
}

for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("DEEPIKA LUTHRA");
delay(i*500);
//clrscr();
cleardevice();
}

for ( i=1;i<=3;i++)
{
setcolor(i+9);
settextstyle( DEFAULT_FONT, HORIZ_DIR, i);
moveto(80,120);
outtext("DEEPIKA LUTHRA");
delay(i*500);
//clrscr();
cleardevice();
}
for(i=1;i<=20;i++)
{
setbkcolor(0);
setcolor(8);
settextstyle(6,0,5);

75
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……….");
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);
outtextxy(320,170,"AIRLINE RESERVATION");
delay(450);
settextstyle(4,0,4);

76
setcolor(20);
outtextxy(320,200,"Presented By:");
delay(450);
outtextxy(320,305,"Deepika Luthra ");
settextstyle(8,0,4);
setcolor(3);
delay(450);
outtextxy(320,235,"Deepika Luthra ");
outtextxy(320,275,"Deepika Luthra");
outtextxy(320,340,"Deepika Luthra");
outtextxy(320,365,"Deepika Luthra");

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();
} }
delay(500);
getch();

77
cleardevice();
closegraph();
clrscr();
}

TESTING

78
Introduction to Testing
The importance of software testing and its implifications with respect
to software quality cannot be over emphasized. Software testing is a
crucial element of software quality assurance and represents the
ultimate review of specification, design, and coding.

The increasing visibility of software as a system element and the


attendant “costs” associated with a software failure are motivating
forces for well-planned, thorough testing. It is not unusual for a
software development organization to expend 40% of total project
effort on testing.

Defect can be caused by a flaw in the application software or by a


flaw in the application specification. For example, unexpected
(incorrect) results can be from errors made during the construction
phase, or from an algorithm incorrectly defined in the specification.
Testing is commonly assumed to mean executing software and
finding errors. This type of testing is known is known as dynamic
testing and while valid, it is not the most effective ay of testing. Static
testing, the review, inspection and validation of development
requirements, is the most effective and cost efficient way of testing. A
structured approach to testing should use both dynamic and static
testing techniques.

Testing Objectives

79
Testing is a process of executing a program with the intent of finding
an error. A good test case is not that has a high probability of finding
an as yet undiscovered error. If testing is conducted successfully (ie.
according of the objectives stated), it will uncover errors in the
software. As a secondary benefit, testing demonstrates that software
functions appear to be working according to specification, that
performance requirements appear to have been met.

Testing and Types of Testing

Testing is a process of executing a program with the intent


of finding an error. A good test case is one that has a high
probability of finding an undiscovered error.

This program has been tested by using data whose results


are already known and well defined.

The following methods have been used:

UNIT TESTING

Each module has been tested independently for accuracy of each


operation in the module.

Each module has been tested for the following cases:

When there are no records of members stored in the file the


message “NO record has been added yet” is displayed.

When the member number entered is not same as the existing.

80
SCREEN LAYOUT

81
SCREEN LAYOUT

82
83
84
85
86
87
BIBLIOGRAPHY

1. COMPLETE REFERENCE C++


2. LET US C BY YASHVANT KANETKAR
3. C++ IN DEPTH BY DEEPALI SRIVASTAVA
4. PROGRAMING IN C++ BY-:
E. BALAGURUSAMY
5. D.S. USING C BY G.S. BALUJA

88
REFERENCES

- ANSI C++ from Complete Reference (Herbert Schieldt)

- Programming with C++ (E. Balagurusamy)

89
IMPLEMENTATION

90
USER MANUAL

Installation Procedure

From Windows Explorer

1. Click on ‘F’ Drive to open the CD after inserting the CD.

2. Copy airline_rev.exe and paste it to desired location

3. Make a new folder with the name Sports in the ‘C’ Drive of Your Hard Disk

4. Run RMS.exe to work on the software.

To install From Dos write the following command on Dos Prompt

1. f:\

2. Copy airline_rev.exe C:

3. C:\

4. md airline_rev

5. airline_rev (This command is used to run the Software)

91
Limitations & Possible Improvements

1. One of the main limitations of the software is that the file handling of C++
language is not flexible. When the data is stored in the file, it is stored
using Classes. If we make any change in classes then the whole file gets
corrupt. If some data is stored in file using classes then to access that
data we have to use the same class only. Even swapping the position of
data elements of the class restricts it from accessing data. This problem
cannot be solved because this is one of the limitations of Programming
Language.

2. One of the major limitations of the software is that a member can only
view one student’s result at a time. There is nothing to view results of all
at once.

3. At the time of entering data of students all the fields are not interlinked
with each other. If we check the value of all the fields with each other by
linking then small mistakes can be removed.

4. Any deleted record cannot be restored. The faculty/operator has to


reenter all the details of the student if the record related to him got
deleted. In this case the main problem will be that the Roll Number of the
student will change. Also we cannot use that deleted Student Roll number
again.

92
Future Scope

There is a vast future scope of this system. This system can be improved and
can be used by various Clubs. If the limitations present in this software are
removed then, this software will become very much user friendly and will be able
to find out even the smallest mistake made by the user. For example entering
data of students, all the fields are not interlinked with each other. If we check the
value of all the fields with each other by linking then small mistakes can be
removed.

No checks have been made in relation to the entry of duplicate records in the
option of creating new users. By removing this limitation we can minimize his
work.

By removing limitations we can enlarge the scope of this software by introducing


the concept of entering new teams.

93
REQUIREMENTS

Before proceeding to the project details it is


necessary to give a brief description of H/W machine on
which the entire work is done. It was IBM PC
computable machine with a Pentium 4 processor, and
104 keys of keyboard
Other description is given bellow:

HARDWARE:

• A computer system with


• 256 MB RAM
• Hard Disk 80GB
• Pentium 4

OPERATING SYSTEM:
• WINDOWS 98, 2000.
• WINDOWS XP, VISTA.

SOFTWARE:

• Turbo C++ LANGUAGE

94
Some intro of
Object-Oriented Programming
Using C++

95
The Origins of C++
C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the
early 1980's, and is based on the C language. The name is a pun - "++" is a
syntactic construct used in C (to increment a variable), and C++ is intended
as an incremental improvement of C. Most of C is a subset of C++, so that
most C programs can be compiled (i.e. converted into a series of low-level
instructions that the computer can execute directly) using a C++ compiler.

C is in many ways hard to categorise. Compared to assembly language it is


high-level, but it nevertheless includes many low-level facilities to directly
manipulate the computer's memory. It is therefore an excellent language for
writing efficient "systems" programs. But for other types of programs, C
code can be hard to understand, and C programs can therefore be
particularly prone to certain types of error. The extra object-oriented
facilities in C++ are partly included to overcome these shortcomings.

96
Some definition of
Object-Oriented Programming
Using C++

Definitions of C++

• C++ is an object-oriented programming (OOP) language that is


viewed by many as the best language for creating large-scale
applications. ...

• An industry standard object-oriented compiled language, formally


standardized in 1998, but tracing its history to the early 1980s, with an
...

• Enhancement to the C language, providing object-oriented


programming features.

• The name of a programming language so called because many


features derived from an earlier compiler named "B" in
commemoration of its parent, BCPL. Before Bjarne Stoustrup settled
the question by designing C++, there was a numorous debate over
whether C's successor should be named "D" or "P.

• "C++" Microsoft Programming Language

• An extension to the C language defined by Bjarne Stroustrop at


Bell Laboratories in 1986. As a superset of C (another language,
developed at Bell Laboratories by Dennis Ritchie in 1972), it provides
additional features for data abstraction and object-oriented
programming.

• An object oriented language that can be compiled and run on a


server via the source file of sample.c and then compiled into an

97
executable file.

• An advanced programming language a computer programming


language.

• A high level language, as opposed to assembler which is a low-


level language. The relative altitude is referenced to how “close” the
language instructions of the language are to the native instructions of
the chip, otherwise known as opcodes.

• related programming languages in current widespread use

• A high level programming language commonly used to write high


performance applications.

• A commonly used programming language that is sometimes used


for Server Side Scripting. It is a modified version of C above.

• A high-level programming language originally designed by Bjarne


Stroustrup at AT&T Bell Labs as an object-oriented extension for the
C language. C++ gradually turned into a full-fledged language, a
superset of C.

• The primary Programming languages for computers of today.

• The following code example adds to and removes elements from


a ListDictionary.

• Programming languages used to build accounting and other


applications.

• With the advent of Object Orientation, in the late 1980s, Bjarne


Stroustrup decided that it was time to improve the C language. He
added some OO features and renamed the language.

• A programming language designed by Dennis Ritchie at AT&T


Bell Labs ca. 1972 for systems programming on the PDP-11 and
immediately used to reimplement UNIX. It was called "C" because
many features derived from an earlier compiler named "B" in
commemoration of *its* parent, BCPL. ...

• C++ is a general-purpose programming language. C++ is


regarded as a mid-level language, as it comprises a combination of
both high-level and low level.

98
SUGGESTIONS
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________

99
NOTES
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_______________________________________________________________________
___________________________________________________________________
_____________________________________________________________________

100
THANK YOU

101

Das könnte Ihnen auch gefallen