airline ticket management

Upload: tkgupta

Post on 10-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Airline Ticket Management

    1/110

    Project report submittedimpartial fulfillment of the requirementfor the award

    Of degree of B.C.A 3rd year

    To

    C.M.K NATIONAL P.G GIRLSCOLLEGE

    SESSION:

    2009-2010

    Under the guidance of: MR.MR.TINKESH GOYALTINKESH GOYAL

    Submitted by: MISS KIRANDEEPKAURColleges roll no.:2202Universities roll no.:

    1

  • 8/8/2019 Airline Ticket Management

    2/110

    CERTIFICATE

    This is to certify that the project work entitled as

    AIRLINE TICKET MANAGEMENT submitted by MISS

    KIRANDEEP KAUR in partial fulfillment of the requirement of

    degree of BACHELOR OF COMPUTER APPLICATION (B.C.A.

    FINAL) to the C.M.K P.G. Girl College affiliated from

    KURUKSHETRA UNIVERSITY, is carried out under my

    supervision and guidance.

    The candidate has done the projectunder my supervision and the work done in the project is the result of

    candidates effort.

    I hereby certify that this project has not been submitted to any

    other university or institute for award of any degree.

    MR. TINKESH GOYAL

    LEC. OF COMP. SCI.

    2

  • 8/8/2019 Airline Ticket Management

    3/110

    CERTIFICATE

    This is to certify that the project work entitled as

    AIRLINE TICKET MANAGEMENT submitted by MISS

    KIRANDEEP KAUR in partial fulfillment of the requirement of

    degree of BACHELOR OF COMPUTER APPLICATION (B.C.A.

    FINAL) to the C.M.K P.G. Girl College affiliated from

    KURUKSHETRA UNIVERSITY, is carried out under my colleges

    lecturer.

    It is to certify that she is a regular student

    of this college. She attends the college computer centre for required

    number of days.

    I hereby certify that this project has not been submitted to any

    other university or institute for award of any degree.

    MRS. VIJYA TOMMER

    PRINCIPAL OF COLLEGE

    3

  • 8/8/2019 Airline Ticket Management

    4/110

    ACKNOWLEGDEMENT

    A Project Report is never the sole product of person whose

    name appears on the cover or front pages of the report. There are

    always many others who put in a lot of efforts in the preparation of

    report. I am virtually thankful to all who contributed to the

    completion of this report. I express my gratefulness to following

    officials in the center. I am grateful to all the employees and staff

    members of my College C.M.K. NATIONAL GIRLS P.G. COLLEGE

    for their friendly behavior throughout making of the Project. My

    heartiest thanks are also due to MR.TINKESH GOYAL who help

    and good wishes went along during my project report.

    4

  • 8/8/2019 Airline Ticket Management

    5/110

    TABLE OFCONTENTS

    Sr.No Name of the Topic Page No

    1 CERTIFICATE 2

    2 CERTIFICATE FROM PRINCIPAL 3

    3 ACKNOWLEDGEMENT 4

    4 INTRODUCTION 7

    5 INTRODUCTION OF C++ 8

    6 PROJECT OBJECTIVE 9

    7 SYSTEM ANALYSIS AND SPECIFICATION 9

    8 DESIGN 10

    9 IMPLEMENTATION 11

    10 CODING OF HOSPITAL MANAGEMENT 12

    11 TESTING 41

    12 OUTPUT 42

    13 CONCLUSION 53

    14 ADVANTAGE OF SOFTWARE DEVELOPED 54

    15 DISADVANTAGE OF SOFTWARE DEVOLOPED 54

    16 FUTURE SCOPE 55

    17 BIBLIOGRAPHY 56

    5

  • 8/8/2019 Airline Ticket Management

    6/110

    INTRODUCTION

    With the coming up of the jet age everyone

    wants to do everything in the fastest way possible.As Such as, using the fastest mode of

    transportation is available. Thus, use of AirlinesServices increases day by day. New developmentsmust be made to keep up with the competition and

    to stand out. In todays date people dont justwant to remove a ticket, they want it done as fast

    as possible.

    To live up to the increasing demand andconstant changes most Airports are investing a

    huge amount of money in computerization &automation of the entire system.

    Initially computers were being used for basic

    calculation. But, it is of much more importancenow. The Airlines Ticket Management System willbe a very useful tool for an Airport System. The

    Airlines Tickets Management presents a scenario,which will help the management to automate the

    process of reservation, cancellation and record ofAirlines Tickets.

    6

  • 8/8/2019 Airline Ticket Management

    7/110

    Problem Description:

    The Airline Tickets Management System will be

    very useful to most Airports. This will automate the

    entire ticket reservation & cancellation process.

    This mainly features on providing a more

    systematic, handy and reliable process of

    managing Airlines Tickets.

    This project will make sure that all the changes

    made in the Airlines Tickets are jotted down

    correctly keeping in mind every detail.

    Thus, this project will automate the entire

    Airline Ticket Management and hence will provide

    quicker and easier access to details related to any

    particular record.

    7

  • 8/8/2019 Airline Ticket Management

    8/110

    SYSTEM STUDY

    System study has following phase

    1) Objective2)Assumptions

    OBJECTIVE

    The Airline Ticket Management System will be

    a very powerful tool for any Airport System. It will

    automate all the ticket management.

    The following are the main aims of this

    project:

    Airlines ticket reservation

    Airlines ticket cancellation

    Knowing the status of the Airline

    This project will help the operators at the

    Airport to easily access data regarding any

    particular record at any point of time. Thus, the

    leading to faster and more accurate services.

    8

  • 8/8/2019 Airline Ticket Management

    9/110

    The main objectives of the project are as

    follows

    Reservation of Airlines tickets.Cancellation of Airlines tickets.

    Keeping a record of Passengers.

    Keeping a list of Passengers.

    Providing as much as possible enquiry.

    ASSUMPTION

    It is assumed that the user of this software has

    some basic knowledge of operating computer.

    It is assumed that the client will provide all the

    hardware and software necessary for running

    this system.

    It is assumed that only the main work unit

    gives the all the work order relating to any

    model.

    It is assumed that only one company is using

    this software.

    9

  • 8/8/2019 Airline Ticket Management

    10/110

    SOFTWARE & HARDWARE

    REQUIREMENT

    Requirement analysis

    Requirement Analysis is a software engineering

    task that bridges the gap between system level

    requirements engineering and software design.

    In the proposed project Software Requirements

    Analysis have been divided into five areas of effort.

    1. Problem reorganization

    2. Evaluation and Synthesis

    3. Modeling

    4. Specification

    5. Review

    10

  • 8/8/2019 Airline Ticket Management

    11/110

    Requirements Elicitation for the Software:

    Before requirements can be analyzed,

    modeled, or specified they are gathered through

    an elicitation process.

    Context free questions were asked to the Cashiers

    and management people belonging to different

    large banks regarding how they would characterize

    a good output that would generate a successful

    solution, what kind of problems will this solution

    address, how they describe the environment in

    which the solution will be used, and will special

    performance issues or constraints affect the way

    the solution is approached.

    Quality Function Deployment:

    11

  • 8/8/2019 Airline Ticket Management

    12/110

    Quality function deployment (QFD) is a

    quality management technique that translates the

    needs of the customer into technical requirements

    for software.

    In QFD two types of requirement are identified.

    Normal Requirements:

    1) Graphical displays:

    a) Fully Menu driven.

    b) Intuitive key assignments and user

    interactive screen.

    c) User Configurable.

    2) Reservation of Airlines tickets.

    3) Cancellation of Airlines tickets.

    4) Keeping a record of Passengers.

    5) Keeping a list of Passengers.

    6) Providing as much as possible enquiry.

    12

  • 8/8/2019 Airline Ticket Management

    13/110

    Expected Requirements:

    These requirements are implicit to the product

    or system and may be so fundamental that the

    customer does not state them.

    The following are listed.

    1. Indexing

    2. Ease of human/machine interaction

    3. Reliability and operational correctness

    4. Ease of software installation

    5. Single point data storage for each data

    element

    6. Maintenance of integrity and inter-linkages

    of data

    13

  • 8/8/2019 Airline Ticket Management

    14/110

    7. Extensive query facility to provide

    immediate answers for management

    8. Matching of physical and logical movement

    of file.

    9. Should be upgradeable to incorporate new

    features.

    ABOUT C++

    The c++ programming language was developed

    at AT & T BELL LABORATORIES in the early 1980s

    by Bjarane Stroustrup. He found C lacking for

    simulations and decided to extended the language

    by adding feature from his favorite language,

    simula 67 was one of the earliest object-oriented

    languages. Bjarane Stroustrup called it C with

    classes originally. The name C++ (pronounced c

    14

  • 8/8/2019 Airline Ticket Management

    15/110

    plus) was coined by RICK MASCITTI where ++

    is the C Increment operator. Ever since its birth,

    C++ evolved to cope with problem encountered by

    users, and through discussion at AT&T. however,

    the maturation of the C++ language is attested to

    by two recent events:

    The formation of an ANSI (American National

    Standard Institute) C++ committee.

    The publication of THE ANNOTATED C++

    REFERENCE MANAUAL by Ellis and Stroustrup.

    OOP Concept:

    The object oriented paradigm is the latest in

    the software development and the most adopter

    15

  • 8/8/2019 Airline Ticket Management

    16/110

    one in the developing projects of today. By

    paradigm one means a way of thinking.

    PARADIGM MEANS ORGANIZING PRINCIPLE OF A

    PROGRAM.IT IS AN APPROACH TO PROGRAMMING

    The Object Oriented Paradigm

    Data

    Member Function

    Member Function

    Data

    Member Function

    Member Function

    Data

    Member Function

    Member Function

    Object

    Object

    Object

    16

  • 8/8/2019 Airline Ticket Management

    17/110

    OOP Terminology and Features:

    The OOPs approach is based on certain

    concepts that help it attain its goal of overcoming

    the drawbacks or shortcomings of conventional

    programming approaches. These general concepts

    of OOPs are given below:

    Data Abstraction

    Data Encapsulation

    Modularity

    Inheritance

    Polymorphism

    17

  • 8/8/2019 Airline Ticket Management

    18/110

    SYSTEM ANALYSIS

    In Analysis of the System, we have seen what

    a system should do. In System Design phase the

    emphasis will be on how to do what a system

    should do.

    There are two main approaches to design:

    1. Data Centered Approach.

    2. Process Centered Approach

    The present project is designed based on Data

    Centered Approach as the modern school of

    thinking on this subject is that if data is organized

    effectively the processes can always be designed in

    such a way that the data is made available to

    them.

    18

  • 8/8/2019 Airline Ticket Management

    19/110

    Context Level Diagram:

    Travel

    Agent

    Airline

    Manager

    ARSFlight List

    Search Criteria

    Passenger informationReservation

    User id, password

    Flight information

    Passenger List

    Fight InfoNew User

    Delete User

    Airport InfoLogin Attempt

    19

  • 8/8/2019 Airline Ticket Management

    20/110

    SYSTEM DESIGN

    Logical Design:

    Data Structured approach is being adapted

    since data can be associated with physical

    structures which can see and feel and it is

    therefore logical to start with data rather than

    processes which are invisible--. They are there,

    but processes cannot be touched or felt.

    Logical Design deals with aspects of design

    which can be implemented on any operating

    environment i.e. one need not know on which

    machine or operating system or database the

    system is going to be working.

    20

  • 8/8/2019 Airline Ticket Management

    21/110

    In physical design, the output of logical

    design is implemented using the features of a

    particular environment.

    Level 0: dataflow diagram:

    Airport File

    Flight File

    Reservation File

    Airline

    Manager

    Travel

    Agent

    3.0

    Manage

    Users

    2.0

    Manage

    Flights

    1.0

    Manage

    Reservation

    4.0

    Manage

    Airport

    Airport Info

    Airport Info

    Airport Code

    Airport Code

    Flight

    Info

    Flight

    Info

    Reservation

    Information

    Reservation

    InformationFlight List

    Search CriteriaFlight Information

    Passerger Information

    Login Attempt

    Login Attempt

    New User

    Delete User

    Passerger

    List

    Flight InfoAirport error

    21

  • 8/8/2019 Airline Ticket Management

    22/110

    Article I. Level 1: Data Flow Diagram:

    TravelAgent

    1.1Search

    Flight

    1.2SelectFlight

    1.3MakeReservation

    1.4

    CancelReservation

    Airport File

    Flight File

    Reservation File

    Flight List

    Airport Code

    FlightInformation

    ReservationInformation

    Search Criteria

    ReservationInformation

    FlightInformation

    Passen-ger

    Infor-mation

    PassengerInformation/FlightInformation

    Flight

    Information

    Level 1 DFD for 1.0 Managing Reservation

    22

  • 8/8/2019 Airline Ticket Management

    23/110

    Level 2 : Data Flow Diagram:

    Level 2 DFD for 1.3 Make Reservation

    TravelAgent

    1.2SelectFlight

    1.3.2Verify

    Seating

    1.3.1VerifyTravelTime

    1.3.3AddReservation

    Reservation File

    ReservationInformation

    PassengerInformation

    FlightInformation

    FlightInformation

    FlightInformation

    PassengerCount

    23

  • 8/8/2019 Airline Ticket Management

    24/110

    Level 3 : Data Flow Diagram:

    Level 3 DFD for 1.3.3 Add Reservation

    1.3.3.1ReduceSeating

    1.3.3.2AddPassengerto List

    Reservation File

    Passenger Count

    Passenger Information

    Level 3 DFD for 1.4.3 Delete Reservation

    Reservation File

    Passenger Count

    1.4.3.1IncreaseSeating

    1.4.3.2RemovePassengerfrom List

    Last Name

    Passenger

    InformationTravelAgent

    VerifySeating

    FlightInformation

    Last Name,Flight Number,Date of Travel

    TravelAgent

    Last Name,Flight Number,Date of Travel

    24

  • 8/8/2019 Airline Ticket Management

    25/110

    PROCESS SPECIFICATIONSDOCUMENTATION

    Process specifications are used to define what

    must be done in order to transform inputs into

    outputs. It documents the logical procedures of

    each of the bottom level processes found in a

    logical dataflow diagram. It is a detailed

    description of the users business activities that

    each bottom level bubble in Data flow diagram

    carries out.

    The process specifications were developed

    considering the following points:

    The users and system analyst must express

    the process specifications in a form that can be

    verified.

    25

  • 8/8/2019 Airline Ticket Management

    26/110

    Process specifications must be expressed in a

    form that can be effectively communicated to

    the various audiences involved.

    ESTIMATION

    PROJECT MANAGEMENT ESTIMATION Under

    project planning function point estimation is being

    adapted.

    Step1:-Computation of (FC) function count theparameters involved are Inputs, Outputs,Inquiries, & Files Interfaces & Levels identified: L-

    Low, A-average, & H-high.

    INPUTS

    Files DataElements

    Level

    Inputs 15 40 H

    Outputs 5 20 H

    Files 14 20 H

    Interfaces 3 15 L

    Inquires 6 10 L

    Using the table given below the unadjustedFunction point calculation is done.

    Description Simple Average Complex

    ExternalInputs

    X 3 X 4 X 6

    26

  • 8/8/2019 Airline Ticket Management

    27/110

  • 8/8/2019 Airline Ticket Management

    28/110

    Operational ease 4

    Extensibility 4

    PC 36

    The adjusted processing complexity iscalculated as follows:

    PCA:-Adjusted processing complexity

    PCA = 0.65+ (0. 01*36)PCA = 0.65+0.01*36PCA = O.65+0.36=1.01

    Function point measure is calculated asfollows:

    Function point measure(FP)

    FP= FC*PCA

    FP= 378*1.01FP= 378No of works nos:-

    Estimated No of function points that can becompleted within one hour: 1

    Work hour estimate for the project= FP/function points per work hour= 378/1 = 378(appro)

    No of hours required to complete the project= 378 hours

    28

  • 8/8/2019 Airline Ticket Management

    29/110

    PROJECT SCHEDULING

    GANTT CHART or Monthly activity

    Actives Feb. March April MayFunctional

    specification10/02 ------

    Program

    specifications

    unit test plans

    15/02

    20/02

    01/03

    31/03

    Coding

    Unit testing

    31/03

    31/03

    20/04

    31/04

    System test

    planUserAcceptance

    plan

    ---

    ---

    31/03 05/04

    05/04-20/04

    Documentation

    System testing

    ----

    ----

    25/03

    ---

    31/04

    31/04 02/05

    User

    Acceptance test

    Packaging

    ----

    ---

    ----

    -----

    03/05-

    05/05

    05/05-07/05

    29

  • 8/8/2019 Airline Ticket Management

    30/110

    30

  • 8/8/2019 Airline Ticket Management

    31/110

    MODELLING

    RELATIONAL MODEL:

    This model proposed by Date states that a

    table with rows and columns to store data where

    each column represents a field an each row a

    record represents the best architecture for the a

    system.

    Each table will have a primary key which will

    contain main data elements of the record.

    All other data elements will be dependent on

    the primary key. Tables will be linked to one

    another through a set of keys called foreign keys

    which will establish connection between tables.

    Normalization:

    Relation model is based on the principles of

    Normalization. Normalization is really formalization

    31

  • 8/8/2019 Airline Ticket Management

    32/110

    of data design. Its objective is to reduce

    redundancy i.e the amount of information needed

    to solve a particular problem is minimized.

    Rule 1:

    A given instance of a data object has one and

    only one value for each object. Attributes

    represent elementary data items. They should not

    contain any internal structure.

    Rule 2:

    When more than one attribute is used to

    identify a data object, the descriptive and

    referential attributes represent a characteristic of

    the entire object and not the characteristic of

    something that would be only part of the identifier.

    Rule 3:

    32

  • 8/8/2019 Airline Ticket Management

    33/110

    All non-identified attributes must represent

    some characteristic of the instance named by the

    identifier of data object and describe other

    attributes. This rule stated differently implies that

    all non-primary key fields must be dependent fully

    on the primary key and must not be dependent on

    each other.

    Based on the principles of Normalization the

    data tables or the logical groups of data for the

    present project are developed. These tables are

    listed above.

    33

  • 8/8/2019 Airline Ticket Management

    34/110

    Article II. PERFORMANCEANALYSIS/OPTIMIZATION

    The following factors are identified while

    analyzing the performance analysis/Optimization of

    the current system.

    Design of data base

    The design of the current data base is done

    using the principle of Normalization and using

    the Relational model for System Design.

    Processing logic

    The processing logic is kept clean and

    simple. Using structured English the logics are

    defined .These logics were designed based on

    the lower level Data Flow Diagrams.

    Tools used

    Since C++ has been regarded as one ofthe secure, robust and efficient application

    development environment the present system is

    developed in it. The Backend used is DAT Files.

    34

  • 8/8/2019 Airline Ticket Management

    35/110

    Environment on which the system will work

    DESIGN PROCEDURES

    Coupling:

    The main criteria for deciding the modules

    from technical angle is to reduce the

    interdependencies between different modules i.e.

    to reduce the degree of coupling

    Between modules If there is lot of dependence

    across modules, then the degree of coupling is

    high while if the dependencies between modules

    are far and few, the degree of coupling is low.

    The overall objective is to keep the degree of

    coupling as low as possible.

    1. This is achieved by eliminating unnecessary

    relationships

    By reducing the number of necessary relationships.

    By increasing the flexibility of necessary

    relationships.

    35

  • 8/8/2019 Airline Ticket Management

    36/110

    In the present project Normal Coupling is used

    In Normal Coupling, data is passed across modules

    through parameters. Data can be passed across

    modules in one of the three ways.

    Data Coupling Stamp Coupling

    Control Coupling

    (i) Data Coupling:

    In Data Coupling data is passed across

    modules through parameters. These parameters

    are basically elementary form of data.

    In the present project Data Coupling is used.

    (ii) COHESION

    Cohesion is the measure of functional

    relatedness of elements within single module.

    When dividing a system into modules, it must be

    ensured that the activities within the module are

    36

  • 8/8/2019 Airline Ticket Management

    37/110

    tightly bound to one another. Cohesion can be

    viewed as opposite of coupling.

    In Functional Cohesion, all activities in the

    module are functionally related or they perform a

    similar function whereas in Sequential Cohesion,

    modules are divided into a series of activities such

    as that the output of one module becomes the

    input to the next module and the chain continues.

    In the present project Functional Cohesion is coupled with

    functional cohesion in order to achieve best form of cohesion.

    37

  • 8/8/2019 Airline Ticket Management

    38/110

    FEASIBILITY STUDY

    Before the development of the Project titled

    Airlines Ticket Management System the need to

    study the feasibility of the successful execution of

    the project was felt and thus the following factors

    are considered for a feasibility study.

    1. Need Analysis:

    In need analysis the following factors are

    considered.

    i. Background information of the

    organization

    ii. Current Issues

    38

  • 8/8/2019 Airline Ticket Management

    39/110

    Economic Feasibility:

    In economic feasibility in order to weigh the

    costs of developing and implementing a new

    system, against the benefits that would accrue

    from having a new system in place the following

    factors are considered.

    Technical feasibility:

    In order to study technical feasibility the

    following factors are considered

    39

  • 8/8/2019 Airline Ticket Management

    40/110

    CODING

    //**PROJECT AIR TICKET RESERVATION ***//

    #include

    #include

    #include

    #include

    #include

    #include

    #include

    #include

    //**THIS CLASS DRAW LINES, BOXES, ETC. *** //

    class DRAW

    {

    public :

    void LINE_HOR(float, float, float, char) ;

    void LINE_VER(float, float, float, char) ;

    void BOX(float,float,float,float,char) ;

    40

  • 8/8/2019 Airline Ticket Management

    41/110

    } ;

    //***THIS CLASS CONTROL ALL THE FUNCTIONS RELATED TO

    TICKETS //****

    class TICKET

    {

    public :

    void ADDITION(void) ;

    void ENQUIRY(void) ;

    char *FLIGHTNO(float) ;

    private :

    void ADD_RECORD(char[10], char[15], char[15],

    float, float) ;

    protected :

    char fltno[10], from[15], to[15] ;

    float ecofair, exefair ;

    } ;

    41

  • 8/8/2019 Airline Ticket Management

    42/110

    //***THIS CLASS CONTROL ALL THE FUNCTIONS RELATED TO

    PASSENGERS //****

    class PASSANGER

    {

    public :

    void ADD_RECORD(float, float, char[26], char[36],

    float, char, char) ;

    void DELETE_TICKET(float) ;

    float DELETE_FLIGHT(float) ;

    void LIST(void) ;

    float LAST_TICKETNO(void) ;

    float SEATS(float) ;

    float FOUND(float) ;

    char *NAME(float) ;

    protected :

    char Class, name[26], address[36], sex ;

    float slno, age, ticketno ;

    } ;

    42

  • 8/8/2019 Airline Ticket Management

    43/110

    //***** THIS IS DERIVED CLASS WHICH CONTROL ALL THE

    FUNCTIONS // RELATED TO RESERVATION, CANCELLATION, ETC.

    //*****

    class RESERVE : public TICKET, public PASSANGER

    {

    public :

    void RESERVATION(void) ;

    void CANCELLATION(void) ;

    void DISPLAY_TICKET(void) ;

    void DELETE_ALL(void) ;

    } ;

    //******// FUNCTION TO DRAW HORIZONTAL LINE //*****

    void DRAW :: LINE_HOR(float column1, float column2, float row,

    char c)

    {

    for ( column1; column1

  • 8/8/2019 Airline Ticket Management

    44/110

    }

    }

    //***// FUNCTION TO DRAW VERTICAL LINE //****

    void DRAW :: LINE_VER(float row1, float row2, float column,

    char c)

    {

    for ( row1; row1

  • 8/8/2019 Airline Ticket Management

    45/110

    char l1=196, l2=179 ;

    if (c == ch)

    {

    c1=218 ;

    c2=191 ;

    c3=192 ;

    c4=217 ;

    l1 = 196 ;

    l2 = 179 ;

    }

    else

    {

    c1=c ;

    c2=c ;

    c3=c ;

    c4=c ;

    l1 = c ;

    l2 = c ;

    }

    gotoxy(column1,row1) ;

    45

  • 8/8/2019 Airline Ticket Management

    46/110

    cout

  • 8/8/2019 Airline Ticket Management

    47/110

    //****// FUNCTION TO ADD GIVEN DATA IN THE TICKET

    FILE(TICKET.DAT) //****

    void TICKET :: ADD_RECORD(char t_fltno[10], char

    t_from[15], char t_to[15], float t_ecofair, float t_exefair)

    {

    fstream file ;

    file.open("TICKET.DAT", ios::app) ;

    strcpy(fltno,t_fltno) ;

    strcpy(from,t_from) ;

    strcpy(to,t_to) ;

    ecofair = t_ecofair ;

    exefair = t_exefair ;

    file.write((char *) this, sizeof(TICKET)) ;

    file.close() ;

    }

    47

  • 8/8/2019 Airline Ticket Management

    48/110

    //** FUNCTION TO RETURNS FLIGHT NO. FOR THE GIVEN

    S.NO //****

    char *TICKET :: FLIGHTNO(float sno)

    {

    fstream file ;

    file.open("TICKET.DAT", ios::in) ;

    float count=1 ;

    while (file.read((char *) this, sizeof(TICKET)))

    {

    if (sno == count)

    break ;

    count++ ;

    }

    file.close() ;

    return fltno ;

    }

    48

  • 8/8/2019 Airline Ticket Management

    49/110

    //**FUNCTION TO GIVES DATA TO ADD RECORDS IN

    TICEKT FILE

    //**

    void TICKET :: ADDITION(void)

    {

    fstream file ;

    file.open("TICKET.DAT", ios::in) ;

    if (!file.fail())

    return ;

    file.close() ;

    ADD_RECORD("KL146", "DELHI", "MUMBI", 1500,

    1700) ;

    ADD_RECORD("KL146", "MUMBI", "DELHI", 1500,

    1700) ; ADD_RECORD("KL156", "DELHI", "CALCUTTA",

    1700, 1900) ; ADD_RECORD("KL156", "CALCUTTA",

    "DELHI", 1700, 1900) ;

    49

  • 8/8/2019 Airline Ticket Management

    50/110

    ADD_RECORD("KL166", "DELHI", "MADRAS", 2100,

    2300) ;

    ADD_RECORD("KL166", "MADRAS", "DELHI", 2100,

    2300) ;

    ADD_RECORD("KL176", "MUMBI", "CALCUTTA", 1900,

    2100) ;

    ADD_RECORD("KL176", "CALCUTTA", "MUMBI", 1900,

    2100) ;

    ADD_RECORD("KL186", "MUMBI", "MADRAS", 1800,

    2000) ;

    ADD_RECORD("KL186", "MADRAS", "MUMBI", 1800,

    2000) ;

    ADD_RECORD("KL196", "CALCUTTA", "MADRAS", 1600,

    1800) ;

    ADD_RECORD("KL196", "MADRAS", CALCUTTA", 1600,

    1800) ;

    }

    //****// FUNCTION TO DISPLAY LIST OF FLIGHTS //***

    50

  • 8/8/2019 Airline Ticket Management

    51/110

    void TICKET :: ENQUIRY(void)

    {

    clrscr(); textcolor(15);

    fstream file ;

    file.open("TICKET.DAT", ios::in) ;

    DRAW d ;

    d.BOX(1,2,80,24,218) ;

    d.LINE_HOR(2,79,4,196) ;

    d.LINE_HOR(2,79,6,196) ;

    d.LINE_HOR(2,79,22,196) ;

    textcolor(LIGHTGRAY+BLINK) ;

    gotoxy(30,3) ;

    cprintf("LIST OF THE FLIGHTS") ;

    textcolor(LIGHTGRAY) ;

    textcolor(BLACK) ; textbackground(WHITE) ;

    for (float i=2; i

  • 8/8/2019 Airline Ticket Management

    52/110

    gotoxy(3,5) ;

    cprintf( " Sno. FLIGHT NO. FROM TO

    ECONOMIC FAIR EXECUTIVE FAIR") ;

    textcolor(LIGHTGRAY) ; textbackground(BLACK) ;

    float row=7, sno=1 ;

    while (file.read((char *) this, sizeof(TICKET)))

    {

    gotoxy(6,row) ;

    cout

  • 8/8/2019 Airline Ticket Management

    53/110

    sno++ ;

    }

    file.close() ;

    }

    //***// FUNCTION TO RESERVE TICKET FOR THE PASSANGER

    //****

    void RESERVE :: RESERVATION(void)

    {

    clrscr(); textcolor(15);

    ENQUIRY() ;

    char t1[5], pclass, pname[26], paddress[36], psex,

    pfltno[10] ;

    float t2, valid, page, tno, sno ;

    PASSANGER p ;

    tno = p.LAST_TICKETNO() + 1 ;

    do

    53

  • 8/8/2019 Airline Ticket Management

    54/110

    {

    valid = 1 ;

    gotoxy(3,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    55/110

    gotoxy(3,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    56/110

  • 8/8/2019 Airline Ticket Management

    57/110

    gotoxy(72,3) ;

    cout

  • 8/8/2019 Airline Ticket Management

    58/110

    return ;

    if (strlen(pname) < 1 || strlen(pname) > 25)

    {

    valid = 0 ;

    gotoxy(5,25) ; clreol() ;

    cout

  • 8/8/2019 Airline Ticket Management

    59/110

    valid = 0 ;

    gotoxy(5,25) ; clreol() ;

    cout

  • 8/8/2019 Airline Ticket Management

    60/110

  • 8/8/2019 Airline Ticket Management

    61/110

  • 8/8/2019 Airline Ticket Management

    62/110

    getch() ;

    }

    //****// FUNCTION TO ADD THE GIVEN DATA IN THE

    PASSANGER'S FILE //***

    void PASSANGER :: ADD_RECORD(float tno, float sno, char

    pname[26], char paddress[36], float page, char psex, char

    pclass)

    {

    fstream file ;

    file.open("PASS.DAT", ios::app) ;

    ticketno = tno ;

    slno = sno ;

    strcpy(name,pname) ;

    strcpy(address,paddress) ;

    age = page ;

    sex = psex ;

    Class = pclass ;

    file.write((char *) this, sizeof(PASSANGER)) ;

    62

  • 8/8/2019 Airline Ticket Management

    63/110

    file.close() ;

    }

    //***// THIS FUNCTION RETURN THE LAST TICKET NO. IN

    THE PASSANGER FILE //*****

    float PASSANGER :: LAST_TICKETNO(void)

    {

    fstream file ;

    file.open("PASS.DAT", ios::in) ;

    float count=0 ;

    while (file.read((char *) this, sizeof(PASSANGER)))

    count = ticketno ;

    file.close() ;

    return count ;

    }

    63

  • 8/8/2019 Airline Ticket Management

    64/110

    //***// THIS FUNCTION RETURN TOTAL NO. OF SEATS IN

    THE PASSANGER FILE //**

    float PASSANGER :: SEATS(float sno)

    {

    fstream file ;

    file.open("PASS.DAT", ios::in) ;

    float count=0 ;

    while (file.read((char *) this, sizeof(PASSANGER)))

    {

    if (sno == slno)

    count++ ;

    }

    file.close() ;

    return count ;

    }

    64

  • 8/8/2019 Airline Ticket Management

    65/110

    //***// THIS FUNCTION RETURN 0 IF THE TICKET NO.

    NOT FOUND IN PASSANGER'S FILE//****

    float PASSANGER :: FOUND(float tno)

    {

    fstream file ;

    file.open("PASS.DAT", ios::in) ;

    float found=0 ;

    while (file.read((char *) this, sizeof(PASSANGER)))

    {

    if (tno == ticketno)

    {

    found = 1 ;

    break ;

    }

    }

    file.close() ;

    return found ;

    }

    65

  • 8/8/2019 Airline Ticket Management

    66/110

    //****// THIS FUNCTION RETURNS PASSANGER'S NAME

    FOR THE GIVEN TICKET NO. //****

    char *PASSANGER :: NAME(float tno)

    {

    fstream file ;

    file.open("PASS.DAT", ios::in) ;

    while (file.read((char *) this, sizeof(PASSANGER)))

    {

    if (tno == ticketno)

    break ;

    }

    file.close() ;

    return name ;

    }

    //*** THIS FUNCTION DISPLAY THE LIST OF THE

    PASSANGERS //***

    void PASSANGER :: LIST(void)

    {

    66

  • 8/8/2019 Airline Ticket Management

    67/110

    clrscr(); textcolor(15);

    char t1[10] ;

    float t2, sno, valid ;

    TICKET ticket ;

    ticket.ENQUIRY() ;

    do

    {

    valid = 1 ;

    gotoxy(3,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    68/110

    sno = t2 ;

    if (strlen(t1) == 0)

    return ;

    if (sno < 1 || sno > 12)

    {

    valid = 0 ;

    gotoxy(3,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    69/110

  • 8/8/2019 Airline Ticket Management

    70/110

  • 8/8/2019 Airline Ticket Management

    71/110

  • 8/8/2019 Airline Ticket Management

    72/110

    if (!flag)

    {

    gotoxy(5,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    73/110

    {

    file.read((char *) this, sizeof(PASSANGER)) ;

    if (file.eof())

    break ;

    if (tno != ticketno)

    temp.write((char *) this, sizeof(PASSANGER)) ;

    }

    file.close() ;

    temp.close() ;

    file.open("PASS.DAT", ios::out) ;

    temp.open("temp.dat", ios::in) ;

    temp.seekg(0,ios::beg) ;

    while ( !temp.eof() )

    {

    temp.read((char *) this, sizeof(PASSANGER)) ;

    if ( temp.eof() )

    break ;

    file.write((char *) this, sizeof(PASSANGER)) ;

    }

    file.close() ;

    73

  • 8/8/2019 Airline Ticket Management

    74/110

  • 8/8/2019 Airline Ticket Management

    75/110

    temp.write((char *) this, sizeof(PASSANGER)) ;

    else

    found = 1 ;

    }

    file.close() ;

    temp.close() ;

    file.open("PASS.DAT", ios::out) ;

    temp.open("temp.dat", ios::in) ;

    temp.seekg(0,ios::beg) ;

    while ( !temp.eof() )

    {

    temp.read((char *) this, sizeof(PASSANGER)) ;

    if ( temp.eof() )

    break ;

    file.write((char *) this, sizeof(PASSANGER)) ;

    }

    file.close() ;

    temp.close() ;

    return found ;

    }

    75

  • 8/8/2019 Airline Ticket Management

    76/110

    //****// THIS FUNCTION CANCELS PASSANGER'S TICKET //****

    void RESERVE :: CANCELLATION(void)

    {

    clrscr(); textcolor(15);

    char t1[10], ch ;

    float t2, tno, valid ;

    do

    {

    valid = 1 ;

    gotoxy(3,23) ; clreol() ;

    cout

  • 8/8/2019 Airline Ticket Management

    77/110

    tno = t2 ;

    if (t1[0] == '0')

    return ;

    if (strlen(t1) == 0)

    {

    valid = 0 ;

    LIST() ;

    clrscr(); textcolor(15);

    }

    if (!FOUND(tno) && valid)

    {

    valid = 0 ;

    gotoxy(3,23) ; clreol() ;

    cout

  • 8/8/2019 Airline Ticket Management

    78/110

    while (file.read((char *) this, sizeof(PASSANGER)))

    if (ticketno == tno)

    break ;

    file.close() ;

    float i=1 ;

    file.open("TICKET.DAT", ios::in) ;

    while (file.read((char *) this, sizeof(TICKET)))

    {

    if (slno == i)

    break ;

    i++ ;

    }

    file.close() ;

    PASSANGER p ;

    DRAW d ;

    d.BOX(15,5,66,21,'*') ;

    d.LINE_HOR(16,65,7,'*') ;

    gotoxy(33,6) ;

    cout

  • 8/8/2019 Airline Ticket Management

    79/110

    cout

  • 8/8/2019 Airline Ticket Management

    80/110

    ch = getche() ;

    ch = toupper(ch) ;

    } while (ch != 'Y' && ch != 'N') ;

    if (ch == 'N')

    return ;

    DELETE_TICKET(tno) ;

    gotoxy(10,25) ;

    cout

  • 8/8/2019 Airline Ticket Management

    81/110

    {

    valid = 1 ;

    gotoxy(3,23) ; clreol() ;

    cout

  • 8/8/2019 Airline Ticket Management

    82/110

  • 8/8/2019 Airline Ticket Management

    83/110

  • 8/8/2019 Airline Ticket Management

    84/110

    if (Class == 'E')

    cout

  • 8/8/2019 Airline Ticket Management

    85/110

    valid = 1 ;

    gotoxy(3,23) ;

    cout

  • 8/8/2019 Airline Ticket Management

    86/110

  • 8/8/2019 Airline Ticket Management

    87/110

  • 8/8/2019 Airline Ticket Management

    88/110

    cprintf("AIR TICKET RESERVATION") ;

    gotoxy(29,10) ;

    cprintf("~~~~~~~~~~~~~~~~~~~~~~") ;

    gotoxy(30,11) ;

    cprintf("1: RESERVATION") ;

    gotoxy(30,12) ;

    cprintf("2: CANCELLATION") ;

    gotoxy(30,13) ;

    cprintf("3: PASSENGER RECORDS ->") ;

    gotoxy(30,14) ;

    cprintf("4: ENQUIRY") ;

    gotoxy(30,15) ;

    cprintf("5: LIST OF PASSENGERS") ;

    gotoxy(30,16) ;

    cprintf("6: QUIT") ;

    gotoxy(30,18) ;

    cprintf("ENTER YOUR CHOICE ") ;

    ch = getche() ;

    textcolor(LIGHTGRAY) ;

    textbackground(BLACK) ;

    88

  • 8/8/2019 Airline Ticket Management

    89/110

  • 8/8/2019 Airline Ticket Management

    90/110

  • 8/8/2019 Airline Ticket Management

    91/110

  • 8/8/2019 Airline Ticket Management

    92/110

  • 8/8/2019 Airline Ticket Management

    93/110

    TESTING

    Software Testing is a critical element of

    software quality assurance and represents the

    ultimate review of specification, design and code

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

    Testing Objectives:

    The following are the testing objectives:

    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 as-yet-undiscovered error

    A successful test is one that uncovers an as yet

    undiscovered error.

    93

  • 8/8/2019 Airline Ticket Management

    94/110

    Testing Principles

    The basic principles that guide software testing are as

    follows:

    All tests should be traceable to customer requirements.

    Tests should be planned long before testing begins.

    The pirate principle applies to software testing.

    Pareto principle states that 80 percent of all errors

    uncovered during testing will likely be traceable to 20 percent

    of all program components.

    Testability

    Software Testability is simply how easily (a computer

    program can be tested). The following characteristics are

    considered that lead to testable software.

    Operability: The better it works, the more efficiently it can

    be tested.Observability: What you see is what you test.

    94

  • 8/8/2019 Airline Ticket Management

    95/110

    Test Case Design:

    The design of testing can be divided into two broad

    categories:

    Black Box testing:

    White Box Testing:

    Black box testing:

    When computer software is considered, black-box testingalludes to tests that are conducted at the software interface.

    White box testing:

    White box testing of software is predicated on close

    examination of procedural detail. Logical paths through the

    software are tested by providing test cases that exercise specific

    sets of conditions and /or loops.

    In the present project Black box testing is used.

    95

  • 8/8/2019 Airline Ticket Management

    96/110

    Integration Testing:

    Integration testing is a systematic technique

    for constructing the program structure while at the

    same time conducting tests to uncover errors

    associated with interfacing.

    In the present project the main interfaces of the

    system are as follows.

    Interface with Database SQL Server

    Interface with Reports generation

    Validation Testing:

    Software validation is achieved through a series of black

    box tests that demonstrate conformity with requirements.

    Validation checks have been performed for all the

    units/functions described in the requirements specifications.

    In the present project the following validations are checked.

    96

  • 8/8/2019 Airline Ticket Management

    97/110

    Whether the fields such as name field starts with a

    number or contains special characters

    Whether the number fields such as phone or age contains

    alphabets.

    Whether the functions such as calculation of fine is done

    properly or not.

    System testing:

    System testing fall outside the scope of the software

    process and are not conducted solely by software engineers.

    It includes the following:

    Recovery testing

    Security testing

    Stress testing

    Performance testing

    OUT PUT

    Main menu

    AIR TICKET RESERVATION ~~~~~~~~~~~~~~~~~~~~~~

    97

  • 8/8/2019 Airline Ticket Management

    98/110

    1: RESERVATION 2: CANCELLATION 3: PASSENGER RECORDS -> 4: ENQUIRY 5: LIST OF PASSENGERS 6: QUIT ENTER YOUR CHOICE

    Press 1 for RESERVATIONPress 2 for CANCELLATIONPress 3 for PASSENGER RECORDS ->

    Press 4 for ENQUIRYPress 5 for: LIST OF PASSENGERSPress 6 for QUIT

    When we press 1

    LIST OF THE FLIGHTS

    Sno. FLIGHT NO. FROM TO ECONOMIC FAIREXECUTIVE FAIR

    1 KL146 DELHI MUMBI 1500 1700 2 KL146 MUMBI DELHI 1500 1700 3 KL156 DELHI CALCUTTA 1700 1900

    98

  • 8/8/2019 Airline Ticket Management

    99/110

  • 8/8/2019 Airline Ticket Management

    100/110

    * Passenger Name: Jon ** ** Address: delhi ** ** Sex : M ** ** Age : 5 ** ** Total Fair: 2100 ** *****************************************************

    For canceling ticket, press 2 in main menu &

    Enter Ticket no. of the Passenger to cancel the TicketPRESS TO SEE LIST or 0 TO EXIT***************************************************** Ticket no. 18 ****************************************************** ** DELHI to MADRAS Flight no. KL166 ** ** Passanger Name : jon ** ** Address : @elhi ** ** Sex : M ** ** Age : 5 ** ** Total Fair: 2300 ** *****************************************************

    Cancel this ticket (y/n):If we press y ticket is canceled

    Press 3 for PASSENGER RECORDS ->

    100

  • 8/8/2019 Airline Ticket Management

    101/110

    EDIT PASSENGER RECORDS ~~~~~~~~~~~~~~~~~~~~~~ 1: PASSANGER INFORMATION 2: DELETE 0: EXIT ENTER YOUR CHOICE

    Press 1 for passenger recordsAfter pressing 1 enter ticket no, and then press enter

    ***************************************************** Ticket no. 18 ****************************************************** ** DELHI to MADRAS Flight no. KL166 ** ** Passanger Name : jon ** ** Address : @elhi ** ** Sex : M ** ** Age : 45 ** ** Total Fair: 2300 ** *

    ****************************************************

    Press any key to continue... after pressing any key we go topassenger records page

    101

  • 8/8/2019 Airline Ticket Management

    102/110

    Press 2 for delete passenger records

    LIST OF THE FLIGHTS

    Sno. FLIGHT NO. FROM TO ECONOMIC FAIREXECUTIVE FAIR

    1 KL146 DELHI MUMBI 1500 1700 2 KL146 MUMBI DELHI 1500 1700 3 KL156 DELHI CALCUTTA 1700 1900 4 KL156 CALCUTTA DELHI 1700 1900 5 KL166 DELHI MADRAS 2100 2300 6 KL166 MADRAS DELHI 2100 2300 7 KL176 MUMBI CALCUTTA 1900 2100 8 KL176 CALCUTTA MUMBI 1900 2100 9 KL186 MUMBI MADRAS 1800 2000

    10 KL186 MADRAS MUMBI 1800 2000 11 KL196 CALCUTTA MADRAS 1600 1800 12 KL196 MADRAS CALCUTTA 1600 1800 Enter Sno. of the FLIGHT for which all passanger records to be deleted :

    102

  • 8/8/2019 Airline Ticket Management

    103/110

  • 8/8/2019 Airline Ticket Management

    104/110

  • 8/8/2019 Airline Ticket Management

    105/110

  • 8/8/2019 Airline Ticket Management

    106/110

  • 8/8/2019 Airline Ticket Management

    107/110

  • 8/8/2019 Airline Ticket Management

    108/110

  • 8/8/2019 Airline Ticket Management

    109/110

  • 8/8/2019 Airline Ticket Management

    110/110