Sie sind auf Seite 1von 56

Existing System

Airline ticket management system has been a tough ask for the management responsible. Details of flights and passengers are maintained on paper. Three registers are maintained wherein the passenger requirements and flight details are taken care of. The 1st register caters to the flight details only. Columns are made that contain flight details such as Flight name and number, Journey destination (from to), Distance to be traveled, Total fare and Total number of seats available. The 2nd register contains the customers details. It carries customer information such as flight name and number, customer(s) name, number of seat(s) reserved, date of journey and destination (from to). The 3rd register deals with the reservation and cancellation process. It maintains details like flight name and number, destination (from - to), date of journey and passenger list for a particular date.

The procedure is carried out in the following manner


The details of the flights are maintained in register 1. The customer fills in the details in accordance to his needs which are written in the second register. Now the management checks the flight details in the 1st register corresponding to what is desired by the customer. A list of available flights is shown to the customer with their fares and other details wherein he has the option to choose amongst them. When the customer selects a particular flight for his journey, the following details are recorded into the reservation / cancellation register- flight name and number, destination (from - to), date of journey and name of the passenger. These details are not secure as anyone can access and even tamper them. If any customer wishes to cancel his journey then simply their name is striked off from the reservation list and a symbol A is put against it, indicating that the seat is available. Also the number of seats available corresponding to that flight is updated in register 1. Since the procedure is manual, it is up to the management to update their entries causing time delay and at times loss of data. No backups are maintained of the registers as they are to be updated manually and regularly leading to cost ineffectiveness.

Problems incurred in the functioning of this system


1) The system is Manual. Hence a lot of man power is required. 2) Since a lot of staff is required to do the job often the staff has to over time, the staff is unwilling to work. This can have catastrophic effect on the work quality 3) Since many people have to be employed for clerical work, the procedure is quite expensive, since they have to be paid overtime, and incentive for coming and working in the holidays 4) The system is error prone due to high probabilty of mistake in manual work. Any carelessness or Even a slight error can have disastrous results. 5) The process is very time consuming. Manual generation of database, validation of details given by the customer, updating the details given by the customer, checking of database to reserve and cancel the ticket is very cumbersome and lengthy procedure. 6) It consumes a lot of effort on the part of staff. All this unnecessary wasting can be easily avoided if the system is improved. 7) This induces inefficiencies in the procedure. 8) There is a scope of partiality by the staff members in the reservation of the tickets. 9) No backup can be maintained as the data is large and duplication of data consumes lot of time.

System Description
The software will take the following inputs:
1. The airlines company adds the details of the flight Flight Name and number Destination from to Distance to be covered Fare 2. The customer gives the input to the reservation of the ticket Number of tickets to be reserved Customers name Date of flight Departure and destination point Flight number Age Gender 3. The customer gives the input to the cancellation of the ticket Flight Number Date for which the ticket is to be cancelled Ticket number to be cancelled

The software gives the following outputs:


1. Flight details Flight List Name and number Destination from to Number of passengers traveling Passenger List Name Destination from to Date Ticket number 2. The software also gives the ticket details after the booking of the ticket and asks for the conformation. 3. The software gives the ticket details before cancellation of the ticket and asks for conformation.

Proposed Solution
ABC airlines should manage the various jobs such as. When a customer comes to reserve a ticket he/she should know which all flights are there according to his need. He should be able to see all the information of a particular flight for which he wants to travel such as the flight number, number of days the flight is scheduled, departure and the destination point, distance covered by the flight, number of seats available in a particular flight and the fare of the flight. The customer reserves the ticket on the internet, when he reserves the ticket he gives the input as the flight number for which he wants to travel, date of the journey, number of tickets to be reserved and if those number of seats are available for that particular flight further details are added else the software pop up a warning that only these many number of seats are available or the flight is full and he can reserve the ticket for the following days. If the required number of seats are available the customer adds more details such as customers name, age (if the age of a person is less than 5 a pop up is generated that no ticket is required), gender. When the customer adds up the above details the software pop up the details entered by the customer and asks for the conformation whether the details entered by him are correct, if yes he asked to make a demand draft in favor of ABC airlines worth the total fare and he is asked to take the print of the ticket generated by the software. The ticket generated by the software prints all the relevant information given by the customer such as flight number, date of the journey, departure and the destination point, number of tickets reserved, total fare and the ticket number. If the details added by him are not correct then the customer is redirected to the reservation page again. Also when a customer comes to cancel the ticket he is asked to enter the flight number, date of reservation, ticket number and number of seats to be cancelled. After giving all the above information the customer is asked for a conformation. If yes then the database for that particular flight is updated for that particular date and the numbers of seats are added to the available seats for that flight. If the details added by him are not correct then the customer is redirected to the cancellation page again.

Requirements
1. Processes or functions have been identified : To add a new flight. To view the list of the flights added. To display details of a particular flight. To calculate the current date of the system. To reserve a ticket. To cancel a ticket. To display the list of passengers. To display information of a particular passenger. 2. Expected Requirements for performance: For a particular set of inputs, the outputs should be correctly produced by the system. The output should be in such a way that it is easily understood by the user. Installation ease. Reliability. 3. Constraints Cost of manufacturing should be manageable. The system should be user-friendly. The system update must be directly available on the website. Appropriate graphical displays.

4. Files Required (a) Flight file Flight number Flight from Flight to Flight time Distance covered by the flight Fare of the flight (b) Ticket file Flight number Date of journey Number of tickets Passengers name, gender Flight from Flight to Flight time Fare of the flight

FEASIBILITY OF THE PRODUCT


The feasibility of the product is a question that conforms the reality to the ideas. Feasibility test is critical .The dimensions that define the feasibility of project are:

ECONOMIC FEASIBILITY
The cost incurred in making the software product is high in comparison to the amount of expenses made by the airlines company. The company will have to invest in a computer severer also. But the cost of the system is only one long time investment and its maintainability is very easy, and the running cost, in comparison to the current running cost, is going to be negligible. The product being complemented by a user manual and documentation is reusable and open to new changes.

TECHNICAL FEASIBILITY
The software is a newly developed application so it does need any other software. The only hardware requirement is a computer server, which can be bought off-the-shelf. The technical feasibility is high and the software can be deployed on any machine having Turbo C++ Compiler.

ENVIRONMENTAL FEASIBILITY
The software is simple; the organizations staff will find database maintenance very simple. The users need not be trained in using the software or have any past experience of working in the software because it is very user friendly and easy to use. But a staff member needs to be trained for using the computer system.

PROGRAMMING LANGUAGE USED


The coding has been done in Turbo C++. C++ is based on the concept of OOPS (Object Oriented Paradigm) which thereby enhances the functionality of the program with many reusable components like functions etc. Also, C++ is the best choice for this project allowing easy access to what was once the daunting task of mastering the many controls and messages of the windows environment. C++ can be used to manipulate databases easily, as is the requirement of the situation.

SOFTWARE MODEL USED


The Software model used is RAPID APPLICATION DEVELOPMENT MODEL because of the following reasons: Project being small demands a systematic and sequential approach to software development i.e. system engineering, software requirement analysis, design, code generation, testing and support occur in sequence. All requirements for the project have been explicitly stated at the beginning. There is very little scope of customers deviation from current requirements, coding and testing after detailed analysis is much easy. The problem can be modularized easily. We have two teams of nearly equal skill who have the skill and commitment to fulfill RAD requirements. The technical risk is not high, as the technology used is not new, and neither does the software require a high degree of interoperability with existing computer programs

SOFTWARE TEAM STRUCTURE


We are using controlled centralized team structure because it is best suited for the project requirements as The difficulty of the problem to be solved is very high. The size of the resultant program in line of codes and function point is large. The time that the team will stay together (team lifetime) is short. The degree to which problem can be modularized is high. The required quality and reliability of the system to be built is high. The delivery date is rigid. The degree of sociability enquired for the project is low.

REQUIREMENT ANALYSIS
REQUIREMENT ELICITATION
It is an approach that helps in overcoming the problem of scope, understandability and volatility of the project by providing the guidelines for requirement gathering activity in an organized manner.

INITIATING THE PROCESS


The objective and requirements of the software were decided upon by group discussions, interviews and meetings with the customer. This project aims at automating the database and functioning of airlines ticket booking system. The software would benefit the organization in reducing the workforce and tasks for validation of data and maintaining the records. The organizations management is requesting the system. The users of the software are primarily the clerical staff. The one time cost of the system will be high, but then the running cost of the system would be much lower than the cost in the current system. The system would be a part of a bigger system, which would control and coordinate all the activities of the organization. It would be linked to system which maintains accounts, and another system which maintains the records of the passengers.

The system has to be developed within a time constraint, as it would be needed soon.

FACILITTED APPLICATION SPECIFICATION TECHNIQUE (FAST)


It is a work product of team of end users and software engineers that help in understanding the software demands completely by generating the following: List of Services: Flight list generation Validation of data Database generation and maintenance Ticket generation Cancellation conformation List of Constraints: The software cant run on a distributed system. There is a constraint on cost The system has to be developed in a very short while List of Validation: In the reservation of the ticket, any field should not be left blank. All fields should be filled correctly Age should be correctly entered The number of tickets reserved should not be more than total available seats in a flight

QUALITY FUNCTION DEPLOYMENT (QFD)


QFD is a quality management technique that translates the need of the customer into technical requirements for the software. It maximizes customers satisfaction by evaluating the requirements of the customer. Normal Requirements: Validation of data Maintaining and updating of applicant database Ticket generation Cancellation conformation Expected Requirements: Ease of installation Operational correctness is very important User friendly Performance Reliability Exciting Requirements: Availability of a well documented software Impressive graphics Generation of tickets Generation of flight schedule

USE CASE
A use case for the airlines ticket booking system is as follows 1. The staff observes the main menu to select one of the following options to perform corresponding function Add flight Flight list Reservation Cancellation List of flights for a particular date List of passengers According to the choice entered, function is performed. If wrong choice is entered, appropriate message is displayed
2. Suppose if the user selects the 1st menu option of add flight. The system

will automatically generate new window. The user will enter the required fields to enter flight information
3. Suppose if the user selects the 2nd menu option of flight list. The system

will then automatically show all the flights that are available with the organization
4. Suppose if the user selects the 3rd menu option of reservation. The system

will automatically generate new window. The user will enter the required fields to reserve a ticket
5. Suppose if the user selects the 4th menu option of cancellation. The

system will automatically generate new window. The user will enter the required fields to cancel a ticket
6. Suppose if the user selects the 5th menu option of list of flights for a

particular date. The system will automatically show all the flights that are available for that particular date
7. Suppose if the user selects the 6th menu option of list of passengers. The

system will automatically show all the passenger list for a particular flight

PROJECT METRICES
PROJECT METRICES
Project metrics are used to control and coordinate software engineering process and to improve quality of the software to be produced. Project specific matrices provide indication of productivity and insight into the technical activities; adapt project workflow and technical activities and code.

FUNCTION ORIENTED METRICES


Function oriented metrics use function point as normalization value. Function points are derived using an empirical relationship based on countable (direct) measure of softwares information domain and assessments of software complexity.

Calculation of complexity adjustment values:

Grade val ue Does the system require reliable backup and recovery? Are data communications required? Are there distributed processing functions? Is performance critical? Will the system run in an existing, heavily utilized operational environment? Does the system require online data entry? Does the on-line data entry require the input transaction to be built over multiple screens or operations? Are the master files updated online? Are the inputs, outputs, inquiries complex? Is the internal processing complex? Is the code designed to be reusable? Are conversion and installation included in the design? Is the system designed for multiple installations in different organizations? Is the application designed to facilitate change and ease of use by the user? Fi= 6 5 4 6 3 6 5 3 2 3 2 0 4 3 52

Calculation of Function point for the ticket booking software


Measurement parameter Weighting count

Count

Weighting Factor (average)

Number of user inputs Number of user outputs Number of user enquiries Number of files Number of external interfaces

9 7 2 2 3

4 5 5 10 5 Count total

36 35 10 20 15 116

Function point = Total count x (0.65 + 0.01 x (Fi)) = 116 x (0.65 + 0.01 x 52) = 135.72
Once function point has been calculated it can be used to normalize measures for software quality, productivity and other attributes Such as Errors per FP Defects per FP $ per FP

RISK ANALYSIS AND MANAGEMENT


RISK ANALYSIS AND MANAGEMENT
ASSESSING OVERALL PROJECT RISK
1. Top software and customer managers are formally committed to support the project 2. End users are moderately committed to use the project 3. Requirements are fully understood by the software engineering team 4. Customers are not fully involved in the definition of requirements 5. End users have realistic expectations 6. The project scope is stable 7. Software engineering team have the right mix of skills 8. Project Requirements are fully stable 9. The project team is inexperienced with the technology to be implemented 10.The number of people in the team are inadequate to do the job 11.All customer constituencies do not agree on the importance of the project to be built

Identifying potential risks and developing a plan to mitigate, monitor and manage risks is of paramount importance. Risk analysis enables to build a risk table by providing detail guidelines in identification and analysis of risk. This is achieved by Risk avoidance Risk monitoring Risk management and contingency plan

For our project the risk table is as follows:


Risks Size estimate may be significantly low Category PS Probability 40% Impact 2 RMMM Ensure that requirements are clearly understood Choose appropriate sizing technique to determine the software size Schedule made should be realistic and achievable Monitor that efforts put are according to schedule Organize task network Assign backup staff member as third party for testing and review Update the employers regularly about the status and working assumptions Get Customers feedback periodically Staff should be told the need for training Conduct test to see if they have really learnt Give training to staff Take regular feedback Involve the end users in development of the system Develop techniques to evoke favorable responses from the users

Delivery deadline may be tightened

BU

80%

Number of people may be inadequate to do the job PS 60% 2

Customer will change requirements

PS

10%

Lack of training on tools DE 20% 3 Staff inexperienced ST 50% 3

End user may resist the system

BU

40%

SOFTWARE QUALITY ASSURANCE (SQA)


Software quality assurance claims to focus on quality tools that audit the source code to determine compliance with language standards. It is an umbrella activity, applied at each step in the software process. It identifies Evaluations to be made Audit and reviews to be performed Standards to be maintained Error reporting and tracking Measurement of changes made Amount of feedback

DATA MODELING And DESIGNS

INPUT-OUTPUT ANALYSIS
INPUTS Flight information is added to the database Entry of customers information while booking a ticket Entry of customers information while canceling a ticket OUTPUTS Total number of flights available with the organization Flight list for a particular date Passenger list for a particular flight

ANALYSIS MODELLING
The analysis model achieves three primary objectives
To describe what the customer requires. To establish a basis for the creation of software design. To define set of requirements that can be validated.

Entity Relation Diagram

Data Dictionary

Data Flow diagram

State- Transition Diagram

It uses a combination of text and diagrammatic form to depict requirements for data, function and behavior in a way that is relatively easy to understand and review. The following tools have been used to model the system.

Entity Relationship Diagram (ERD) specifies the relationships between data objects and attribute of each data object can be described using a data object description. Data Flow Diagram (DFD) provides an indication of how data are transformed as they move through the system. Also depicts the function that transforms the data flow. PSPEC specifies the work of each process i.e. the description of each function presented in DFD. Data dictionary has been used as a repository that contains description of all data objects consumed or produced by the software.

PROCESS SPECIFICATION (PSPEC)


Process Name: Reservation This process helps the staff to reserve a ticket and add the correct data to database Staff (customer command) Selects reservation from the main menu Enter flight number If (valid flight number) Do Enter the date of flight Open (file ticket) If (number of tickets available) Further information is entered (name, age, number of tickets, gender) If (age<5) No ticket is required All the data is updated to the database Else Print (the flight is full) Else Print (Invalid flight number)

DATA DICTIONARY
Name: Ticket Aliases: None Where/How used Generate passenger list (Output) Reservation function (Input) Cancellation function (Input) Description Ticket = Template (generated automatically) + User input = Flight name number + Customers name + Age + Gender + Number of tickets + Date of flight Name: Flight Aliases: None Where/How used Generate flight list (Output) Description Flight = Flight number + Flight (from-to) + Flight timing + Distance + Fare Name: Database Aliases: None Where/How used Flight addition (input) Flight list (output) Reservation (store) Cancellation (Input) Passenger list (store) Passenger information (output)

DESIGN CONCEPTS
Design is a problem solving process with an objective to describe a way to implement the systems functional requirements, respecting the constraints imposed and adhering to good quality. It has following goals: Ensuring that functionality conforms to requirements Increasing quality such as usability, efficiency, maintainability, and reusability Cohesion and Coupling A measure of extent to which related aspects of system are kept together in the same module is cohesion. Coupling defines interdependencies that exist between software modules. It implies if one needs to reuse components, one must import all the modules coupled. Understandability To build a good quality product, the design of the software should be clearly understood. Coupling and Cohesion: High Cohesion and Average Coupling make sure that to understand one component there is no need to refer to other components of the software as well. Naming: Modules are named according to the function they perform. System Documentation: Documentation is systematic, organized and easily understandable.

reliability,

The sample code


int row=7; int mfltno=0; fstream file; file.open("FLIGHT.DAT", ios::in); gotoxy(30,1); cout <<"\nLIST OF THE FLIGHTS"; gotoxy(30,2); cout <<"******************"; gotoxy(2,4); cout <<" FLIGHT NO. FROM TO"; gotoxy(1,5); cout <<"*****************************************************"; while (!file.eof()) { file.read((char *) this , sizeof(FLIGHT)); if(mfltno!=flight_no) { gotoxy(4,row); cout <<flight_no; gotoxy(20,row); puts(from); gotoxy(40,row); puts(to); row++; } mfltno = flight_no; } file.close();

SOFTWARE 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 as-yetundiscovered error. A successful test is one that uncovers an as-yetundiscovered error.

White-Box Testing
White-box testing also called glass-box testing is a test case design method that uses the control structure of the procedural design to derive test cases. Using white-box testing methods, the software engineer can test cases that Guarantee that all independent paths within in a module have been exercised at least once Exercise all logical decisions on their true and false sides Execute all loops at their boundaries and within their operational bounds Exercise internal data structures to ensure their validity

Basis Path Testing


Basis path testing is a white-box testing technique. The basis path method enables the test case designer to derive a logical complexity measure of a procedural design and use this measure as a guide for defining basis set of execution paths. Test cases derived the basis set are guaranteed to execute every statement in the program at least one time during testing.

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. The objective is to take unit tested components and build a program structure that has been dictated by design. Bottom-up Integration Bottom-up integration testing begins construction and testing with atomic modules. Because components are integrated from the bottom-up, processing required for components subordinate to a given level is always available and the need for stubs is eliminated. A bottom-up integration strategy was implemented with the following steps: 1. Low-level components are combined into clusters that perform a specific software sub function 2. A driver is written to coordinate test case input and output 3. The cluster is tested Drivers are removed and clusters are combined moving upward in the program structure

Validation Testing
Validation tries to uncover errors, but the focus is at the requirements level on things that will be immediately apparent to the end user. It is achieved through a series of black-box tests that demonstrate conformity with requirements. A test plan outlines the classes of tests to be conducted and a test procedure defines specific test cases that will be used to demonstrate conformity with requirements. Both the plan and procedure are designed to ensure that all functional requirements are satisfied, all behavioral characteristics are achieved, all performance requirements are attained, documentation is correct and human-engineered and other requirements are met.

Black-Box Testing
It is also called behavioral testing, focuses on the functional requirements of the software. It enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program.

System Testing
System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose, all work to verify that system elements have been properly integrated and perform allocated functions.

Recovery Testing
Recovery testing is a system test that forces the software to fail in a variety of ways and verifies that recovery is properly performed. If recovery is automatic, reinitialization, check pointing mechanisms, data recovery, and restart are evaluated for correctness. If recovery requires human intervention, the mean-time-to-repair (MTTR) is evaluated to determine whether it is within acceptable limits.

PROJECT SCHEDULING
The project schedule and project plan is tracked and monitored on a continuing basis. A task set selector is applied on the overall project to determine the degree of rigor with which the software process should be applied. Computing task set selector Adaptation criteria Size of project Number of users Business criticality Longevity Stability of requirements Ease of communication Maturity of technology Performance constraints Project staffing Interoperability Grade 2 3 3 2 4 4 2 3 1 2 Weight 1.2 1.1 1.1 0.9 1.2 0.9 0.9 0.8 1 1.1 New development 1 1 1 1 1 1 1 1 1 1 Task set selector Product 2.4 3.3 3.3 1.8 4.8 3.6 1.8 2.4 1 2.2 2.66

Interpreting the TSS value and selecting the task set:

TSS = 2.66 It lies in the category of 1.0 < 2.66 < 3.0 Therefore the task set selector value recommends a structured degree of rigor to be followed in scheduling the processes.

SOFTWARE CODING

/* PROJECT AIRLINES TICKET BOOKING SYSTEM */ #include <iostream.h> #include <process.h> #include <fstream.h> #include <string.h> #include <stdio.h> #include <ctype.h> //#include <conio.h> #include <dos.h> /* THIS CLASS CONTAIN ALL THE FUNCTION RELATED TO DATE */ class DATE { public: void CURRENT_DATE(); }; struct getdate { float dd,mm,yyyy; } dat; /* THIS CLASS CONTAIN ALL THE FUNCTION RELATED TO FLIGHT */ class FLIGHT { public: int flight_no, dist; int fare; char from[50] , to[50]; float hh,mm; void ADDITION(); void FLIGHT_LIST(); int FOUND_FLIGHT(int); }; /* THIS CLASS CONTAIN ALL THE FUNCTION RELATED TO TICKET LIKE RESERVATION, CANCELLATION, ETC. */

class TICKET { int ticket_no , kms; char name[26] , sex; int flt_no; int age , fair , d , m , y; char from[15] , to[15]; public : void RESERVATION(); void CANCELLATION(); void LIST(); void PASS_INFO(); }f; /* FUNCTION TO GET THE DATE */ void DATE :: CURRENT_DATE() { clrscr(); int dtarr[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; cout<<"\nEnter The Date For Which You Want To Process The Data "; cout<<"\nPlese Enter Valid Numeric Date Otherwise The System Will"; cout<<" Be Hanged "; cout<<"\nEnter The Day : ";cin>>dat.dd; cout<<"\nEnter The Month : ";cin>>dat.mm; cout<<"\nEnter The Year : ";cin>>dat.yyyy; if(dat.mm<1 || dat.mm>12) { cout<<"\nInvalid Date"; getch(); DATE DT; DT.CURRENT_DATE(); return; }

if(int(dat.dd)<1) { cout<<"\nInvalid Date"; getch();

DATE DT; DT.CURRENT_DATE(); return; } if(int(dat.yyyy)%4==0 && (int(dat.yyyy)%100!=0||int(dat.yyyy) %400==0)) { if(int(dat.mm)==2) { if(int(dat.dd)>29) { cout<<"\nInvalid Date"; getch(); DATE DT; DT.CURRENT_DATE(); return; } } else { if(dtarr[int(dat.mm)]<int(dat.dd)) { cout<<"\nInvalid Date"; getch(); DATE DT; DT.CURRENT_DATE(); return; } } } else { if(dtarr[int(dat.mm)]<int(dat.dd)) { cout<<"\nInvalid Date"; getch(); DATE DT; DT.CURRENT_DATE(); return; } } } /* THIS FUNCTION GIVES THE DATA TO ADD RECORDS IN FLIGHT FILE */

void FLIGHT :: ADDITION() { fstream file; clrscr(); cout<<"\t\tEnter Flight Details\n\n"; cout<<"Flight No. : "; cin>>flight_no; cout<<"Flight From : "; gets(from); cout<<"\nFlight To : "; gets(to); cout<<"\nEnter Time In Hours : "; cin>>hh; cout<<"\nEnter Time In Minutes : "; cin>>mm; cout<<"\nEnter Distance In Kilometer : "; cin>>dist; cout<<"\nEnter Fare: "; cin>>fare; file.open("FLIGHT.DAT",ios::app); file.seekg(0,ios::end); file.write((char *) this , sizeof(FLIGHT)); cout<<"Flight Added"; file.close(); } /* FUNCTION TO DISPLAY THE FLIGHT LIST */ void FLIGHT :: FLIGHT_LIST() { clrscr(); int row=7; int mfltno=0; fstream file; file.open("FLIGHT.DAT", ios::in); gotoxy(30,1); cout <<"\nLIST OF THE FLIGHTS"; gotoxy(30,2); cout <<"******************"; gotoxy(2,4); cout <<" FLIGHT NO. FROM gotoxy(1,5);

TO";

cout <<"*****************************************************"; while (!file.eof()) { file.read((char *) this , sizeof(FLIGHT)); if(mfltno!=flight_no) { gotoxy(4,row); cout <<flight_no; gotoxy(20,row); puts(from); gotoxy(40,row); puts(to); row++; } mfltno = flight_no; } file.close(); return; } /* THIS FUNCTION RETURNS ONE IF GIVEN FLIGHT NO. FOUND */ int FLIGHT :: FOUND_FLIGHT(int fltno) { fstream file; int found=0; file.open("FLIGHT.DAT" , ios::in); while (file.read((char *) this , sizeof(FLIGHT))) { if (fltno==flight_no) { found = 1; break; } } file.close(); return found; }

/* THIS FUNCTION DISPLAY THE PASSENGER INFORMATION */ void TICKET :: PASS_INFO()

clrscr(); int fltno; FLIGHT flight; DATE dt; int ticketno=0 , found=0; fstream file; flight.FLIGHT_LIST(); cout <<"\n\n Enter the flight no. "; cin >>fltno; if (!flight.FOUND_FLIGHT(fltno)) { cout <<"\n\nFlight no. is invalid"; getch(); return; } clrscr(); dt.CURRENT_DATE(); cout <<"\n\n Enter TICKET No. of the Ticket : "; cin >>ticketno; file.open("TICKET.DAT", ios::in); while (file.read((char *) this , sizeof(TICKET))) { if (flt_no == fltno && ticketno == ticket_no) { found = 1; clrscr(); gotoxy(5,5); cout <<"********************************************"; cout <<"****************************"; gotoxy(32,7); cout <<"AIR INDIA"; gotoxy(10,9); cout <<"TICKET NO. " <<ticket_no <<"\t\t\t\tDate : " <<int(dat.dd)<<"-"<<int(dat.mm)<<"-"<<int(dat.yyyy); gotoxy(10,10); cout <<"Flight no. : " <<flt_no; gotoxy(35,12); cout <<"From : " <<from <<"\tTo : " <<to; gotoxy(35,13); cout <<"Kms. " <<kms; gotoxy(10,15); cout <<"Passenger name : " <<name;

gotoxy(10,16); cout <<"Passenger age : " <<age <<"\t\tSex : " <<sex; gotoxy(10,18); cout <<"Total Fair : " <<fair; gotoxy(5,20); cout <<"*****************************************"; cout <<"*******************************"; gotoxy(1,25); cout <<"Press any key to continue..."; getch(); break; } } file.close(); if (!found) { cout <<"\n\n\7 Ticket not found"; getch(); } } /* FUNCTION TO RESERVE TICKET FOR THE PASSENGER */ void TICKET :: RESERVATION() { clrscr(); int fltno; FLIGHT flight; DATE dt; char pname[26] , psex , pfrom[15] , pto[15] , ch; int pkms , page , pfair,ticketno=0; float hh,mm; fstream file; FLIGHT ft; flight.FLIGHT_LIST(); cout <<"\n\n Enter the flight no. "; cin >>fltno; if (!flight.FOUND_FLIGHT(fltno)) { cout <<"\n\nFlight no. is invalid"; //getch();

return; } clrscr(); dt.CURRENT_DATE(); file.open("TICKET.DAT", ios::in); while (file.read((char *) this , sizeof(TICKET))) { if (flt_no==fltno) { if(d==dat.dd && m==dat.mm && y==dat.yyyy) { ticketno = ticket_no; } } } file.close(); ticketno++; clrscr(); cout <<"\n\n Enter name of passenger : "; gets(pname); cout <<"\n Enter age : "; cin >>page; if (page <= 5) { cout <<"\nNo ticket is required upto age of 5"; //getch(); return; } do { cout <<"\n Enter sex (M/F) : "; cin >>psex; } while (toupper(psex) != 'M' && toupper(psex) != 'F'); fstream fp("FLIGHT.DAT",ios::in); while(!fp.eof()) { fp.read((char *) &ft,sizeof(FLIGHT)); if(ft.flight_no==fltno) { strcpy(pfrom,ft.from); strcpy(pto,ft.to); pkms=ft.dist; pfair=ft.fare; hh=ft.hh; mm=ft.mm; break; }

} fp.close(); clrscr(); gotoxy(5,5); cout <<"*********************************************************"; cout <<"***************"; gotoxy(32,7); cout <<"AIR INDIA"; gotoxy(10,9); cout <<"TICKET NO. " <<ticketno <<"\t\t\t\tDate : " <<int(dat.dd)<<"-"<<int(dat.mm)<<"-"<<int(dat.yyyy); gotoxy(35,9); cout<<"Time "<<int(hh)<<":"<<int(mm); gotoxy(10,10); cout <<"\n\tFlight no. : " <<fltno; gotoxy(35,12); cout <<"From : " <<pfrom <<"\tTo : " <<pto; gotoxy(35,13); cout <<"Kms. " <<pkms; gotoxy(10,15); cout <<"Passenger name : " <<pname; gotoxy(10,16); cout <<"Passenger age : " <<page <<"\t\tSex : " <<psex; gotoxy(10,18); cout <<"Total Fair : " <<pfair; gotoxy(5,20); cout <<"********************************************************** *"; cout <<"*************"; cout <<"\n\n\n"; do { cout <<"Do you want to save ticket (y/n) "; cin >>ch; } while (toupper(ch) != 'Y' && toupper(ch) != 'N'); if (toupper(ch) == 'N') { return; } file.open("TICKET.DAT", ios::app);

f.ticket_no = ticketno; f.kms = pkms; strcpy(f.name , pname); f.flt_no=fltno; strcpy(f.from , pfrom); strcpy(f.to , pto); f.sex = psex; f.age = page; f.d = dat.dd; f.m = dat.mm; f.y = dat.yyyy; file.write((char *) &f , sizeof(TICKET)); file.close(); } /* FUNCTION TO CANCEL THE RESERVED TICKET OF THE PASSENGER */ void TICKET :: CANCELLATION() { clrscr(); int ticketno=0 , found=0,fltno; char ch; FLIGHT flight; DATE dt; fstream file , temp; flight.FLIGHT_LIST(); cout <<"\n\n Enter the flight no. "; cin >>fltno; if (!flight.FOUND_FLIGHT(fltno)) { cout <<"\n\nFlight no. is invalid"; getch(); return; } clrscr(); dt.CURRENT_DATE(); cout <<"\n\n Enter TICKET No. of the Ticket to be Cancelled : "; cin >>ticketno; file.open("TICKET.DAT" , ios::in); temp.open("TEMP.DAT", ios::out); while (file.read((char *) this , sizeof(TICKET)))

{ if (flt_no == fltno && ticketno == ticket_no && dat.dd==d && dat.mm==m && dat.yyyy==y) { found = 1; clrscr(); gotoxy(5,5); cout <<"******************************************"; cout <<"******************************"; gotoxy(32,7); cout <<"AIR INDIA"; gotoxy(10,9); cout <<"TICKET NO. " <<ticket_no <<"\t\t\t\tDate : " <<int(dat.dd)<<"-"<<int(dat.mm)<<"-"<<int(dat.yyyy); gotoxy(10,10); cout <<"Flight no. : " <<flt_no; gotoxy(35,12); cout <<"From : " <<from <<"\tTo : " <<to; gotoxy(35,13); cout <<"Kms. " <<kms; gotoxy(10,15); cout <<"Passenger name : " <<name; gotoxy(10,16); cout <<"Passenger age : " <<age <<"\t\tSex : " <<sex ; gotoxy(10,18); cout <<"Total Fair : " <<fair; gotoxy(5,20); cout <<"*****************************************"; cout <<"*******************************"; do { gotoxy(1,25); clreol(); cout <<"Do you want to Cancel ticket (y/n) "; cin >>ch; } while (toupper(ch) != 'Y' && toupper(ch) != 'N'); } else { temp.write((char *) this , sizeof(TICKET)); } }

file.close(); temp.close(); if (!found) { cout <<"\n\n Ticket not found"; getch(); return; } if (toupper(ch) == 'N') { return; } file.open("TICKET.DAT", ios::out); temp.open("TEMP.DAT", ios::in); while (temp.read((char *) this , sizeof(TICKET))) { file.write((char *) this, sizeof(TICKET)); } file.close(); temp.close(); delete("TEMP.DAT"); } /* FUNCTION TO DISPLAY THE LIST OF THE PASSENGER */ void TICKET :: LIST() { clrscr(); int fltno; FLIGHT flight; DATE dt; fstream file; int row=8 , found=0; flight.FLIGHT_LIST(); cout <<"\n\n Enter the flight no. for the List :"; cin >>fltno; if (!flight.FOUND_FLIGHT(fltno)) { cout <<"\n\nFlight no. is invalid"; getch(); return; } clrscr(); dt.CURRENT_DATE(); clrscr();

file.open("TICKET.DAT", ios::in); gotoxy(25,1); cout <<"LIST OF THE PASSENGERS"; gotoxy(25,2); cout <<"******************************"; cout <<"\nFlight no.: " <<fltno <<"\t\t\t\tDate: " <<int(dat.dd)<<"-"<<int(dat.mm)<<"-"<<int(dat.yyyy); gotoxy(2,5); cout <<" TICKET NO. PASSENGER NAME FROM TO" ; gotoxy(1,6); cout <<"*******************************************************"; cout <<"*****************"; while (file.read((char *) this , sizeof(TICKET))) { if (flt_no == fltno && dat.dd==d && dat.mm==m && dat.yyyy==y) { found = 1; gotoxy(4,row); cout <<ticket_no; gotoxy(14,row); cout <<name; gotoxy(41,row); cout <<from; gotoxy(63,row); cout <<to; row++; if (row == 25) { getch(); for (int i=8; i<=24; i++) { gotoxy(1,i); clreol(); } row = 8; } } } file.close(); if (!found) { cout <<"\n\n\n\n\n No Reservation.";

getch(); return; } cout <<"\n\nPress any key to continue..."; getch(); } /*THIS IS THE INTRODUCTION TO THE PROJET */ void Intro() { clrscr(); char *line1={"Welcome To Airlines Ticket Booking System"}; char *line2={"Project Developed By"}; char *line3={"AKSHU & SHRIKANT "}; char *line4={"Press Any Key To Continue ...."}; cout<<"\n\n\n\n\t\t\t "; cout<<" AIR INDIA"; cout<<"\n\n"; for(int i = 0 ; i<80 ; i++) { cout<<"*~"; } cout<<"\n\n"; cout<<"\t\t "; for(i = 0 ; i<strlen(line1) ; i++) { cout<<line1[i]; } cout<<"\n\n\n\t\t\t\t\t"; for(i = 0 ; i<strlen(line2) ; i++) { cout<<line2[i]; } cout<<"\n\t\t\t\t\t"; for(i = 0 ; i<strlen(line3) ; i++) { cout<<line3[i]; } cout<<"\n\n"; for(i = 0 ; i<80 ; i++) { cout<<"*~"; } cout<<"\n\n\n\n"; for(i = 0 ; i<strlen(line4) ; i++)

{ } }

cout<<line4[i];

/* MAIN FUNCTION WHICH DISPLAY MAIN MENU & CALLS ALL OTHER FUNCTIONS */ void main() { clrscr(); Intro(); getch(); TICKET ticket; FLIGHT flight; int ch; while(1) { clrscr(); cout <<" \n\n\n\t\t\t ** AIR INDIA **\n"; cout<<"\t\t\t*********************\n"; cout <<"\t\t\t0 :: ADD FLIGHT\n"; cout <<"\t\t\t1 :: FLIGHT LIST\n"; cout <<"\t\t\t2 :: RESERVATION\n"; cout <<"\t\t\t3 :: CANCELLATION\n"; cout <<"\t\t\t4 :: LIST\n"; cout <<"\t\t\t5 :: PASSENGER INFO.\n"; cout <<"\t\t\t6 :: QUIT\n"; cout <<"\t\t\tEnter your choice :: "; cin>>ch; switch(ch) { case 0 : flight.ADDITION(); getch(); break; case 1 : flight.FLIGHT_LIST(); gotoxy(1,25); cout <<"Press any key to continue..."; getch(); break; case 2 : ticket.RESERVATION(); break; case 3 : ticket.CANCELLATION();

break; case 4 : ticket.LIST(); break; case 5 : ticket.PASS_INFO(); break; case 6 : exit(0); }//end of switch }//end of while }//end of main()

Bibliography

1. Roger S. Pressman, Software Engineering a Practitioners Approach 5th

Edition 2. Robert Lafore, Turbo C++


3. Pankaj Jalote, An integrated Approach to Software Engineering, 2nd

Edition

Airlines Ticket Booking System

AKSHU BHAGAT 2506

A SOFTWARE ENGINEERING REPORT

CERTIFICATE
This is to certify that the project entitled AIRLINES TICKET BOOKING SYSTEM has been made by Akshu Bhagat, Bsc. (H) Computer Science, 4th Semester, Shaheed Sukhdev College of Business studies, Delhi University, Roll No. 2506, in his individual capacity under my supervision for the fulfillment of Bsc. (H) Comp. Sci. 4th Semester practical examination.

(Mrs kavita Rastogi)

DATE:

S.E Teacher. CBS.

ACKNOWLEDGEMENT

We extend our profound gratitude to our project guide Ms Kavita Rastogi, for her interest, guidance and suggestions throughout the course of the project. We feel honored and privileged to work under her. She shared her vast pool of knowledge with us that helped us steer through all the difficulties with ease. This project would not have been possible without her guidance and we would like to thank her for everything she has done for us.

Akshu Bhagat Gokul Bajaj Bhuvan Chugh

Das könnte Ihnen auch gefallen