You are on page 1of 12

SYNOPSIS

Acknowledgement

Objective

Program Description

Header Files Used

Algorithm

Coding

Execution & Output

Result

Bibliography
Objective
To write a program for flight ticket

booking that demonstrates the concept of

files and file handling in C++.


Program Description
 The ticket booking system allows the user to book

and reserve tickets for their journey.

 The program through class passenger gets all the

details of the passenger.

 A main function is opened.

 Which calls a function home() which displays the

home page.

 A switch statement is used to call the functions

corresponding to the value that the user has

entered.

 A password has to be chosen before selecting and

reserving a seat.

 If the user books the ticket, his details get stored in

a file name “ABDe.txt”.

 After Booking he receives ticket number.

 He still now can cancel his booking using the

necessary details and the password he has chosen.


HEADER FILES USED
 fstream.h

 conio.h

 string.h

 stdio.h

 DOS.h

 process.h
Algorithm
 Declaration of required header files.

 Define a class passenger with the variables necessary.

 Declare and define the functions required for the

program.

Inside the class:

 void input(): To get details of the passenger

 Declare file stream objects

 Open file using ios::out mode

 Write the class object to the file

 Close the file

 close the class passenger

 open the main function

 main()

{ Allot seat numbers for the flights;

home();

. }
OUTPUT
Result
Thus, I have demonstrated that this

program titled “Flight Ticket Booking”

will serve as a helpful tool for the

passengers.

The program can be executed in

TURBO C++, Codeblocks or any other

similar IDE compiler.

This program has been executed and

the output has been verified.


Bibliography
 Computer Science With C++ by Sumita

Arora

 School Library

 Internet

You might also like