Sie sind auf Seite 1von 45

TRAVEL AGENCY

A Project Report​ ​Submitted in partial


fulfillment of the requirements for the Award of
degree
Bachelor of Computer Application

2014 – 2017

Submitted by:- Guided by:-


Sourabh Sharma Mr. Sarvesh Singh

BHARATI VIDYAPEETH DEEMED UNIVERSITY SCHOOL OF


DISTANCE EDUCATION
Academic Study Center - BVIMR, New Delhi
An ISO 9001:2008 Certified Institute
NAAC Accredited Grade “A” University

1
Student Undertaking

Certificate of Originality

I ​SOURABH SHARMA ​BCA V Semester would like to declare that the project report
entitled ​“TRAVEL AGENCY” Submitted to ​Bharati Vidyapeeth Deemed University Pune​,
School of Distance Education , Academic Study Centre BVIMR New Delhi in partial fulfillment
of the requirement for the award of the degree. It is an original work carried out by me under the
guidance of ​Mr. SARVESH SINGH ​. All respected guides, faculty member and other sources
have been properly acknowledged and the report contains no plagiarism. To the best of my
knowledge and belief the matter embodied in this project is a genuine work done by me and it
has been neither submitted for assessment to the University not to any other University for the
fulfillment of the requirement of the course of study.

Student Name with Signature ​SOURABH SHARMA

2
Acknowledgement

Apart from efforts of mine, the success of this project depends largely on encouragement and
guideline of many others. I take the opportunity to express my gratitude to the people who have
been instrumented in the successful completion of this project.

I would like to show my appreciation to my project guide ​Mr. SARVESH SINGH ​without her
encouragement and guideline this project would not have materialized.

3
INDEX

CHAPTER 1 - INTRODUCTION 7-9

1.1 Introduction about Project 7


1.2 Need of Computerization of System 7
1.2.1 Data 7
1.2.2 Database 8
1.2.3 LAN (Local Area Network) 8
1.2.4 Records 8
1.2.5 Share 8
1.3 Proposed Software (What would s/w accomplish?) 8
1.4 Importance of the Work 9

CHAPTER 2 - SYSTEM ANALYSIS 10 - 12

2.1 Feasibility Study of s/w includes its types 10


2.1.1 Technical Feasibility 10
2.1.2 Economic Feasibility 10
2.2 Analysis Methodology (Types) 10
2.3 Choice of Platforms s/w & h/w 11
2.3.1 Software used 11
2.3.2 Hardware used 12

CHAPTER 3 - SYSTEM DESIGN 13 - 20

3.1 Design methodology 13

4
3.2 Database Design 13
3.3 Screen Design 14
3.4 Report Design (Screenshots) 15 - 20
Figure 3.4.1 - Home Page 15
Figure 3.4.2 - Introduction 16
Figure 3.4.3 - Reservation 17
Figure 3.4.4 - Deletion 18
Figure 3.4.5 - List of Passenger 19
Figure 3.4.6 - Passenger Info 20

CHAPTER 4 - TESTING AND IMPLEMENTATION 21 - 42

4.1 Testing Methodology (Types) 21


4.2 Unit Testing 22
4.3 Module Testing 23
4.4 System Testing 23
4.5 Alpha/ Beta Testing 24
4.5.1 Alpha Testing 24
4.5.2 Beta Testing 24
4.6 White Box/Black Box Testing 24
4.6.1 White Box Testing 24
4.6.2 Black box Testing 25
4.7 Coding 25 - 42
4.8 Implementation 42
4.9 Post Implementation 42

CHAPTER 5 - CONCLUSION AND REFERENCES 43 - 45

5.1 Conclusion 43

5
5.2 Limitation of System 43
5.3 Future Scope for Modification 43
5.3.1 Reusability 43
5.3.2 Understandability 44
5.3.3 Cost-effectiveness 44
5.4 Requirements 44
5.4.1 H/W Requirement 44
5.4.2 S/W Requirement 44
5.5 References/ Bibliography 45

6
Chapter-1 INTRODUCTION

1.1 ​Introduction​ ​about​ ​Project

For Tour & Travels management system, this project considers six departments –
Introduction, Reservation, Delete Record, Passenger List, Passenger Info, Quit . These
departments work simultaneously with the operations mentioned above. You can check the info
of Tour & Travel agency in Introduction section, reserved a seat in Reservation section, delete a
consumer record in Delete Record section, check the list of passenger in Passenger List section,
check information of passenger in Passenger Info section or exit the program in Quit section.
These are the functions used in this project:
void INFORMATION(void)
void RESERVATION(void)
void DELETION(void)
void LIST_OF_PASS(void)
void PASS_INFO(void)
void MAINMENU(void)

1.2 ​Need​ ​of​ ​Computerization​ ​of​ ​System

A computerized Tour & Travel system keeps track of all periodicals in the system and their
reservation status.

1.2.1 Data
Factual information or information for computer processing, distinct pieces of information
usually formatted in a special way. All software is divided into two general categories: data and
Programs. Programs are collections of instructions for manipulating data. Data can exist in a

7
variety of forms -- as numbers or text on pieces of paper, as bits and by test stored in electronic
memory, or as facts stored in a person's mind.

1.2.2 Database
A set of data that has a regular structure and that is organized in such a way that a computer can
easily find the desired information.

1.2.3 LAN (Local Area Network)


This serves a local area (typically the area of a floor of a building, but in some cases spanning a
distance of several kilometers).

1.2.4 Records
Data, details, documents, file, information, or reports. In the structure of a database, the part
consisting of several uniquely named components called data fields. Several data records make
up a data file, and several data files make up a database.

1.2.5 Share
Distributing or giving files, or a resource such as a file, folder or printer, that has been made
sharable with other users on the network.

1.3 ​Proposed​ ​Software​ ​(What​ ​would​ ​s/w​ ​accomplish?)

Proposed software is an automated Management System. Through our software user can
reserve our seats and check current status.
Our proposed system has the following advantages.
User friendly interface
Fast access to database

8
Less error
More Storage Capacity
Search facility
Look and Feel Environment
All the manual difficulties in managing the tour and travelling have been rectified by
implementing computerization.

1.4 ​Importance​ ​of​ ​the​ ​Work

It would not be wrong to say that traveling is one of the most used and hence most required part
of today’s time. Even if the travel agency is highly reputed, a slower response time would affect
its reputation. The proposed system not only just automates the process but also reduce the
response time from hours or days to just a few seconds.

9
Chapter-2 SYSTEM ANALYSIS

2.1 ​Feasibility​ ​Study​ ​of​ ​s/w​ ​includes​ ​its​ ​types

Whatever we think need not be feasible .It is wise to think about the feasibility of any problem
we undertake. Feasibility is the study of impact, which happens in the organization by the
development of a system. The impact can be either positive or negative. When the positives
nominate the negatives, then the system is considered feasible. Here the feasibility study can be
performed in two ways such as technical feasibility and Economical Feasibility.

2.1.1 Technical Feasibility


We can strongly say that it is technically feasible, since there will not be much difficulty in
getting required resources for the development and maintaining the system as well. All the
resources needed for the development of the software as well as the maintenance of the same is
available in the organization here we are utilizing the resources which are available already.

2.1.2 Economic Feasibility


Development of this application is highly economically feasible .The organization needed not
spend much more for the development of the system already available. The only thing is to be
done is making an environment for the development with an effective supervision. If we are
doing so , we can attain the maximum usability of the corresponding resources .Even after the
development , the organization will not be in a condition to invest more in the organization .
Therefore , the system is economically feasible.

2.2 ​Analysis​ ​Methodology​ ​(Types)

In this project we have used Rapid Application Development (RAD) model. RAD is an
incremental software development process model that emphasizes an extremely short

10
development cycle. The following phases are encompassed:
● Business modeling: ​All the information about the business functioning of the
traveling agency is collected, how the data and information is flow from one end to
another end using the following questions: What information drives the department
process? What information is generated? Who generates it? Where does the information
go? Who process it?

● Data modeling: ​The information collected in Business modeling phase is refined into
a set of data objects that are needed to support the project. The attributes of each object
are identified and the relationships between these objects defined.

● Process modeling: ​Processing descriptions and functions like maintaining place


information, booking, printing reports, providing information, file handling etc. are
created.

● Application generation: ​The fourth generation techniques are used to generate


application, like reusing the predefined functions or creating reusable components.
● Testing​: ​Most of the functions are already tested, as they are predefined functions.
However, new components or functions are also tested after application generation.

2.3 ​Choice​ ​of​ ​Platforms​ ​s/w​ ​&​ ​h/w

2.3.1 Hardware Requirements


Processor Pentium IV 2GHz and Above
RAM 2GB RAM
Monitor: 15” Color Monitor
Keyboard
Mouse

11
2.3.2 Software Requirements
Operating System Windows 10 XP
Developing Tool Turbo C
Database Files (.txt)

12
Chapter-3 SYSTEM DESIGN

3.1 ​Design​ ​methodology

The scope of the systems design is guided by the framework for the new system developed
during analysis. More clearly defined logical method for developing system that meets user
requirements has led to new techniques and methodologies that fundamentally attempt to do the
following:
● Improve productivity of analysts and programmers
● Improve documentation and subsequent maintenance and enhancements.
● Cut down drastically on cost overruns and delays
● Improve communication among the user, analyst, designer, and programmer.
● Standardize the approach to analysis and design
● Simplify design by segmentation.

3.2 ​Database​ ​Design

The general theme behind a database is to handle information as an integrated whole. A database
is a collection of interrelated data stored with minimum redundancy to serve many users quickly
and effectively. After designing input and output, the analyst must concentrate on database
design or how data should be organized around user requirements. The general objective is to
make information access, easy quick, inexpensive and flexible for other users. During database
design the following objectives are concerned:-
● Controlled Redundancy
● Data independence
● Accurate and integrating
● More information at low cost
● Recovery from failure

13
● Privacy and security
● Performance
● Ease of learning and use

3.3 ​Screen​ ​Design

The screen is designed in very simple and understandable manner. The menu driven system has
all the necessary information displayed on the running screen.

14
3.4 ​Report​ ​Design​ ​(Screenshots)

Figure 3.4.1 - Home Page

15
Figure 3.4.2 - Introduction

16
Figure 3.4.3 - Reservation

17
Figure 3.4.4 - Deletion

18
Figure 3.4.5 - List of Passenger

19
Figure 3.5.6 - Passenger Info

20
Chapter-4 TESTING AND IMPLEMENTATION

4.1 ​Testing​ ​Methodology​ ​(Types)

System Testing is the most time-consuming, but an essential activity of a software project.
Testing is vital to the success of the system. System testing makes a logical assumption that if all
the part of the system are correct, the goal will be successfully achieved. Non-testing leads to
errors. A small system error can conceivably explode into a much larger problem. Though,
during development phase, programmers also test their programs, but they generally do not test
the programs in a systematic way. This is because, developing phase, they concentrate more on
removing syntax and some logical errors of programs. And for making the system reliable and
errors free, the complete system must be tested in systematic and organized way.
Types of Testing :-

● Unit Testing ​– ​Testing of individual programs or modules is known as unit testing.


Unit Testing is done during both the development and testing phase.

● Integration Testing ​– ​Testing the interface between related modules of a system is


known as integration testing. After development phase, all modules are tested to check
whether they are properly integrated or not.

● System Testing ​– ​Executing programs of entire system under specially prepared test
data, by assuming that the programs will give logical error and may not be according to
specifications is known as system testing. System testing is actually the testing that is
done during testing phase.

● Verification Testing ​– Running the system under a simulated environment using


simulated data in order to find errors is known as verification testing or alpha testing.

● Validation Testing ​– ​Running the system under the live environment using live data
in order to find error is known as Validation testing or beta testing.

21
● Accepting Testing ​– ​Running the system under live or realistic data by the actual
user is called acceptance testing. It can be done during both testing and implementation
phase.

● Static Testing ​– Observing the behaviour of the system not by executing the system
but through reviews, reading the programs or any other non- execution method is called
Static testing.

● Dynamic Testing ​- ​Observing the behaviour of the system by executing the system is
called dynamic testing. Except static testing, all other testing, types are actually dynamic
design.

4.2 ​Unit​ ​Testing

In computer programming, unit testing is a software testing method by which individual units of
source code, sets of one or more computer program modules together with associated control
data, usage procedures, and operating procedures, are tested to determine whether they are fit for
use. Intuitively, one can view a unit as the smallest testable part of an application. In procedural
programming, a unit could be an entire module, but it is more commonly an individual function
or procedure. In object-oriented programming, a unit is often an entire interface, such as a class,
but could be an individual method. Unit tests are short code fragments created by programmers
or occasionally by white box testers during the development process. It forms the basis for
component testing. Ideally, each test case is independent from the others. Substitutes such as
method stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in
isolation. Unit tests are typically written and run by software developers to ensure that code
meets its design and behaves as intended.

22
4.3 ​Module​ ​Testing

Module testing is the testing of complete code objects as produced by the compiler when built
from source. A library may be composed of a single compiled object or several compiled
objects. There is only a slight difference between unit testing and module testing. Modules are
fully formed chunks of coherent source code that can typically be tested by driving a few
function signatures with various stimuli. On the other hand, unit testing (which is considered as
part of the implementation phase for this software development process) may involve testing one
small part of a function that will never formally implement any function interface. As a result of
modules being more self-contained, module testing will likely require less testing infrastructure
such as test harnesses and test stubs. The testing of modules could perhaps even be automated so
that they can be included in regression test suites or acceptance test suites.

4.4 ​System​ ​Testing

System testing of software or hardware is testing conducted on a complete, integrated system to


evaluate the system's compliance with its specified requirements. System testing falls within the
scope of black-box testing, and as such, should require no knowledge of the inner design of the
code or logic. As a rule, system testing takes, as its input, all of the "integrated" software
components that have passed integration testing and also the software system itself integrated
with any applicable hardware system(s). The purpose of integration testing is to detect any
inconsistencies between the software units that are integrated together (called assemblages) or
between any of the assemblages and the hardware. System testing is a more limited type of
testing; it seeks to detect defects both within the "inter-assemblages" and also within the system
as a whole.

23
4.5 ​Alpha​ ​/​ ​Beta​ ​Testing

4.5.1 Alpha Testing


This is a form of internal acceptance testing performed mainly by in-house software QA and
testing teams. Alpha testing is the last testing done by test teams at development site after the
acceptance testing and before releasing the software for beta test. Alpha testing can also be done
by potential users or customers of the application. But still this is a form of in-house acceptance
testing.

4.5.2 Beta Testing


This is a testing stage followed by internal full alpha test cycle. This is the final testing phase
where companies release the software for few external user groups outside the company test
teams or employees. This initial software version is called as beta version. Most companies
gather user feedback in this release.

4.6 ​White​ ​Box​ ​And​ ​Black​ ​Box​ ​Testing

4.6.1 White Box Testing


White box sometimes called “Glass box testing” is a test case design uses the control structure of
the procedural design to drive test case.
Using white box testing methods, the following tests were made on the system
● All independent paths within a module have been exercised once. In our system, ensuring
that case was selected and executed checked all case structures. The bugs that were
prevailing in some part of the code where fixed
● All logical decisions were checked for the truth and falsity of the values.

24
4.6.2 Black box Testing
Black box testing focuses on the functional requirements of the software. This is black box
testing enables the software engineering to derive a set of input conditions that will fully exercise
all functional requirements for a program. Black box testing is not an alternative to white box
testing rather it is complementary approach that is likely to uncover a different class of errors
that white box methods like..
1) Interface and Performance errors
2) Performance in data structure
3) Initializing and termination errors

4.7 ​Coding

/*****************************/
/* PROJECT TRAVEL AGENCY */
/*****************************/

/* INCLUDED HEADER FILES */

#include <iostream.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 TICKET


// LIKE RESERVATION, DELETION, ETC.

25
class TRAVEL
{
public :
void INFORMATION(void) ;
void RESERVATION(void) ;
int RESERVED(int,int,int,int,int) ;
int AVAIL(int,int,int,int) ;
void DELETION(void) ;
void LIST_OF_PASS(void) ;
void PASS_INFO(void) ;
void MAINMENU(void) ;
private :
int busno, seatno ;
char name[26], sex ;
int age, fair ;
int dd, mm, yy ;
};

char *place[3]={"Jaipur","Nainital","Chandigarh"} ;
int price[3]={220,220,210} ;

/* THIS FUNCTION DISPLAY THE PASSENGER INFORMATION */

void TRAVEL :: PASS_INFO(void)


{
clrscr() ;

26
int bno=0, found=0, sno, d, m, y ;
cout <<"\n Bus 1 : Delhi to Jaipur. <Fare Rs.220>" ;
cout <<"\n Bus 2 : Delhi to Nainital. <Fare Rs.220>" ;
cout <<"\n Bus 3 : Delhi to Chandigarh. <Fare Rs.210>" ;
do
{
cout <<"\n\n Enter the bus no. (1/2/3) " ;
cin >>bno ;
} while (bno < 1 || bno > 3) ;
cout <<"\n\nEnter the Date of the reserved ticket (dd mm yyyy) : " ;
cin >>d >>m >>y ;
cout <<"\nEnter the Seat no. : " ;
cin >>sno ;
if (sno > 60 || sno < 1 || !RESERVED(bno,d,m,y,sno))
{
cout <<"\n\n\n Sorry!\7 Seat not reserved" ;
getch() ;
return ;
}
fstream file ;
file.open("BUS.txt", ios::in) ;
while (file.read((char *) this, sizeof(TRAVEL)))
{
if ((dd == d && mm == m && yy == y) && bno == busno && sno ==
seatno)
{
found = 1 ;
clrscr() ;
gotoxy(5,5) ;

27
cout
<<"************************************************************************" ;
gotoxy(28,7) ;
cout <<"BOOM- BOOM TRAVEL AGENCY" ;
gotoxy(10,9) ;
cout <<"BUS NO. " <<bno <<"\t\t\t\tDate : " <<d <<"/" <<m <<"/"
<<y ;
gotoxy(10,10) ;
cout <<"Seat no. : " <<sno ;
gotoxy(35,12) ;
cout <<"From : Delhi" <<"\tTo : " <<place[bno-1] ;
gotoxy(10,15) ;
cout <<"Passenger name : " <<name ;
gotoxy(10,16) ;
cout <<"Passenger age : " <<age <<"\t\tSex : " <<sex ;
gotoxy(10,18) ;
cout <<"Total Fare : " <<price[bno-1] ;
gotoxy(5,20) ;
cout
<<"************************************************************************" ;
gotoxy(1,25) ;
cout <<"Press any key to continue..." ;
getch() ;
break ;
}
}
file.close() ;
if (!found)
{

28
cout <<"\n\n\7 Passenger record not found" ;
getch() ;
}
}

void TRAVEL :: LIST_OF_PASS(void)


{
clrscr() ;
int bno=0, found=0, row=8 ;
char ch ;
cout <<"\n Bus 1 : Delhi to Jaipur. <Fare Rs.220>" ;
cout <<"\n Bus 2 : Delhi to Nainital. <Fare Rs.220>" ;
cout <<"\n Bus 3 : Delhi to Chandigarh. <Fare Rs.210>" ;
do
{
cout <<"\n\n Enter the bus no. (1/2/3) " ;
cin >>bno ;
} while (bno < 1 || bno > 3) ;
do
{
cout <<"\n\n Do you want date wise report (y/n) " ;
cin >>ch ;
} while (toupper(ch) != 'N' && toupper(ch) != 'Y') ;
int d=0, m=0, y=0 ;
if (toupper(ch) == 'Y')
{
cout <<"\n\n Enter the Date for the report (dd mm yyyy) : " ;
cin >>d >>m >>y ;

29
}
clrscr() ;
gotoxy(25,1) ;
cout <<"LIST OF THE PASSENGERS" ;
gotoxy(24,2) ;
cout <<"************************" ;
cout <<"\nBus no.: " <<bno <<"\t\t\t\tFrom: Delhi To: " <<place[bno-1] ;
gotoxy(2,5) ;
cout <<" SEAT NO. PASSENGER NAME SEX AGE DATE" ;
gotoxy(1,6) ;
cout
<<"************************************************************************" ;
fstream file ;
file.open("BUS.txt", ios::in) ;
while (file.read((char *) this, sizeof(TRAVEL)))
{
if (busno == bno)
{
if ((toupper(ch) == 'N') || ((toupper(ch) == 'Y') && (dd == d && mm
== m && yy == y)))
{
found = 1 ;
gotoxy(5,row) ;
cout <<seatno ;
gotoxy(14,row) ;
cout <<name ;
gotoxy(43,row) ;
cout <<sex ;
gotoxy(50,row) ;

30
cout <<age ;
gotoxy(61,row) ;
cout <<dd<<"/"<<mm<<"/"<<yy ;
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\7 No Reservation for the bus no. "<<bno ;
getch() ;
return ;
}
cout <<"\n\nPress any key to continue..." ;
getch() ;
}

31
int TRAVEL :: AVAIL(int bno, int d, int m, int y)
{
fstream file ;
file.open("BUS.txt", ios::in) ;
int avail=0, count=0 ;
while (file.read((char *) this, sizeof(TRAVEL)))
{
if (bno == busno && dd == d && mm == m && yy == y)
count++ ;
}
file.close() ;
if (count < 60)
avail = 1 ;
return avail ;
}

int TRAVEL :: RESERVED(int bno, int d, int m, int y, int sno)


{
fstream file ;
file.open("BUS.txt", ios::in) ;
int reserved=0 ;
while (file.read((char *) this, sizeof(TRAVEL)))
{
if (bno == busno && dd == d && mm == m && yy == y && seatno==sno)
{
reserved = 1 ;
break ;
}

32
}
file.close() ;
return reserved ;
}

/* FUNCTION TO RESERVE TICKET FOR THE PASSENGER */

void TRAVEL :: RESERVATION(void)


{
clrscr() ;
int bno=0, sno=0, pfair=0, page=0 ;
char pname[26], psex, ch ;
cout <<"\n Bus 1 : Delhi to Jaipur. <Fare Rs.220>" ;
cout <<"\n Bus 2 : Delhi to Nainital. <Fare Rs.220>" ;
cout <<"\n Bus 3 : Delhi to Chandigarh. <Fare Rs.210>" ;
do
{
cout <<"\n\n Enter the bus no. (1/2/3) " ;
cin >>bno ;
} while (bno < 1 || bno > 3) ;
int d,m,y ;
cout <<"\n\nEnter the Date for the reservation (dd mm yyyy) : " ;
cin >>d >>m >>y ;
if (!AVAIL(bno,d,m,y))
{
cout <<"\n\n\n Sorry!\7 Seats not available." ;
getch() ;
return ;

33
}
cout <<"\nEnter the Seat no. : " ;

cin >>sno ;
if (sno > 60 || sno < 1 || RESERVED(bno,d,m,y,sno))
{
cout <<"\n\n\n Sorry!\7 Seat already reserved" ;
getch() ;
return ;
}
cout <<"\n Enter Name of passenger : " ;
gets(pname) ;
do
{
cout <<" Enter Sex of passenger (M/F) : " ;
cin >>psex ;
} while (toupper(psex) != 'M' && toupper(psex) != 'F') ;
cout <<" Enter age : " ;
cin >>page ;
if (page <= 5)
{
cout <<"\7\nNo ticket is required upto age of 5" ;
getch() ;
return ;
}

clrscr() ;
gotoxy(5,5) ;

34
cout
<<"************************************************************************" ;
gotoxy(28,7) ;
cout <<"BOOM- BOOM TRAVEL AGENCY" ;
gotoxy(10,9) ;
cout <<"BUS NO. " <<bno <<"\t\t\t\tDate : " <<d <<"/" <<m <<"/" <<y ;
gotoxy(10,10) ;
cout <<"Seat no. : " <<sno ;
gotoxy(35,12) ;
cout <<"From : Delhi" <<"\tTo : " <<place[bno-1] ;
gotoxy(10,15) ;
cout <<"Passenger name : " <<pname ;
gotoxy(10,16) ;
cout <<"Passenger age : " <<page <<"\t\tSex : " <<psex ;
gotoxy(10,18) ;
cout <<"Total Fair : " <<price[bno-1] ;
gotoxy(5,20) ;
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 ;
fstream file ;
file.open("BUS.txt", ios::app) ;

35
busno = bno ;
seatno = sno ;
strcpy(name,pname) ;
sex = psex ;
age = page ;
fair = pfair ;
dd = d ;
mm = m ;
yy = y ;
file.write((char *)this, sizeof(TRAVEL)) ;
file.close() ;
}

/* FUNCTION TO DELETE RECORD OF THE PASSENGER */

void TRAVEL :: DELETION(void)


{
clrscr() ;
int bno=0, found=0, sno, d, m, y ;
char ch ;
cout <<"\n Bus 1 : Delhi to Jaipur. <Fare Rs.220>" ;
cout <<"\n Bus 2 : Delhi to Nainital. <Fare Rs.220>" ;
cout <<"\n Bus 3 : Delhi to Chandigarh. <Fare Rs.210>" ;
do
{
cout <<"\n\n Enter the bus no. (1/2/3) " ;
cin >>bno ;
} while (bno < 1 || bno > 3) ;

36
cout <<"\n\nEnter the Date of the reserved ticket (dd mm yyyy) : " ;
cin >>d >>m >>y ;
cout <<"\nEnter the Seat no. : " ;
cin >>sno ;
if (sno > 60 || sno < 1 || !RESERVED(bno,d,m,y,sno))
{
cout <<"\n\n\n Sorry!\7 Seat not reserved" ;
getch() ;
return ;
}
fstream file, temp ;
file.open("BUS.txt", ios::in) ;
temp.open("TEMP.txt", ios::out) ;
while (file.read((char *) this, sizeof(TRAVEL)))
{
if ((dd == d && mm == m && yy == y) && bno == busno && sno ==
seatno)
{
found = 1 ;
clrscr() ;
gotoxy(5,5) ;
cout
<<"************************************************************************" ;
gotoxy(28,7) ;
cout <<"BOOM-BOOM TRAVEL AGENCY" ;
gotoxy(10,9) ;
cout <<"BUS NO. " <<bno <<"\t\t\t\tDate : " <<d <<"/" <<m <<"/"
<<y ;
gotoxy(10,10) ;

37
cout <<"Seat no. : " <<sno ;
gotoxy(35,12) ;
cout <<"From : Delhi" <<"\tTo : " <<place[bno-1] ;
gotoxy(10,15) ;
cout <<"Passenger name : " <<name ;
gotoxy(10,16) ;
cout <<"Passenger age : " <<age <<"\t\tSex : " <<sex ;
gotoxy(10,18) ;
cout <<"Total Fair : " <<price[bno-1] ;
gotoxy(5,20) ;
cout
<<"************************************************************************" ;
do
{
gotoxy(1,25) ; clreol() ;
cout <<"Do you want to Delete (y/n) " ;
cin >>ch ;
} while (toupper(ch) != 'Y' && toupper(ch) != 'N') ;
if (toupper(ch) == 'N')
temp.write((char *) this, sizeof(TRAVEL)) ;
}
else
temp.write((char *) this, sizeof(TRAVEL)) ;
}
file.close() ;
temp.close() ;
if (!found)
{
cout <<"\n\n\7 Passenger record not found" ;

38
getch() ;
return ;
}
if (toupper(ch) == 'N')
return ;
file.open("BUS.txt", ios::out) ;
temp.open("TEMP.txt", ios::in) ;
while (temp.read((char *) this, sizeof(TRAVEL)))
file.write((char *) this, sizeof(TRAVEL)) ;
file.close() ;
temp.close() ;
}

void TRAVEL :: INFORMATION(void)


{
clrscr();
gotoxy(20,8);
cout<<"INTRODUCTION OF BOOM- BOOM TRAVEL AGENCY";
gotoxy(4,10);
cout<<"In this agency there is totally three buses whose routes and fair are:" ;
gotoxy(15,12);
cout <<" Bus 1 : Delhi to Jaipur. <Fare Rs.220>" ;
gotoxy(15,13);
cout <<" Bus 2 : Delhi to Nainital. <Fare Rs.220>" ;
gotoxy(15,14);
cout <<" Bus 3 : Delhi to Chandigarh. <Fare Rs.210>" ;
gotoxy(4,16);

39
cout<<"You can reserve a ticket of any date and later on cancel the same also. ";
gotoxy(28,23);
cout<<"Press a Key to continue...." ;
getche();
}

/* MAIN FUNCTION WHICH DISPLAY MAIN MENU & CALLS ALL OTHER
FUNCTIONS */

void MAINMENU(void)
{
TRAVEL travel ;
char ch ;
while (1)
{
clrscr() ;
gotoxy(26,5) ;
cout <<"***************************" ;
gotoxy(26,6) ;
cout <<"* BOOM- BOOM TRAVEL AGENCY *" ;
gotoxy(26,7) ;
cout <<"***************************" ;
gotoxy(29,10) ;
cout <<"1 :: INTRODUCTION" ;
gotoxy(29,11) ;
cout <<"2 :: RESERVATION" ;
gotoxy(29,12) ;
cout <<"3 :: DELETE RECORD" ;

40
gotoxy(29,13) ;
cout <<"4 :: PASSENGER LIST" ;
gotoxy(29,14) ;
cout <<"5 :: PASSENGER INFO." ;
gotoxy(29,15) ;
cout <<"6 :: QUIT" ;
gotoxy(29,18) ;
cout <<"Enter your choice :: " ;
fflush(stdin);
ch = getche() ;
if (ch == 27 || ch == '6')
break ;
else
if (ch == '1')
travel.INFORMATION();
else
if (ch == '2')
travel.RESERVATION() ;
else
if (ch == '3')
travel.DELETION() ;
else
if (ch == '4')
travel.LIST_OF_PASS() ;
else
if (ch == '5')
travel.PASS_INFO() ;
}
}

41
void main(void)
{
MAINMENU();
}

4.8 ​Implementation

Travelling ​is a fast growing business. The ancient methods of running it are no longer dynamic
and efficient. For expeditious retrieval and dissemination of information and better service for
the client, application of modern techniques has become absolutely indispensable. that’s why this
software has been made so that running and keeping record of Travel Agency becomes easy,
reliable and fast.

4.9 ​Post​ ​Implementation

This application can be easily implemented under various situations. We can add new features as
and when we require. Reusability is possible as and when require in this application. There is
enough flexibility in all the modules that’ll reduce the upgradation time.

42
Chapter-5 CONCLUSION AND REFERENCES

5.1 ​Conclusion

This project is only a little try to satisfy the needs in a tour and travel agency. Several user
friendly coding have also adopted. This package shall prove to be a powerful package in
satisfying all the requirements of the agency. The objective of software planning is to provide a
framework that enables the manager to make reasonable estimates made within a limited time
frame at the beginning of the software project and should be updated regularly as the project
progresses.

5.2 ​Limitation​ ​of​ ​System

● These packages may not meet user requirements in all respect.


● Extensive modifications of a package usually results in loss of the vendor's support.

5.3 ​Future​ ​Scope​ ​for​ ​Modification

As there is constant evolution in the needs of any organisation to stay up-to-date in the market,
there are lots of possibilities of modification in the given system and can be extended. The
following principles enhances extensibility like hide data structure, avoid traversing multiple
links or methods, avoid case statements on object type and distinguish public and private
operations.

5.3.1 Reusability
Reusability is possible as and when require in this application. We can update it next version.
Reusable software reduces design, coding and testing cost by amortizing effort over several
designs. Reducing the amount of code also simplifies understanding, which increases the

43
likelihood that the code is correct. We follow up both types of reusability: Sharing of newly
written code within a project and reuse of previously written code on new projects.

5.3.2 Understandability
A method is understandable if someone other than the creator of the method can understand the
code (as well as the creator after a time lapse). We use the method, which small and coherent
helps to accomplish this.

5.3.3 Cost-effectiveness
Its cost is under the budget and make within given time period. It is desirable to aim for a system
with a minimum cost subject to the condition that it must satisfy the entire requirement. Scope of
this document is to put down the requirements, clearly identifying the information needed by the

user, the source of the information and outputs expected from the system.

5.4 ​Requirements

5.4.1 Hardware Requirements


Processor Pentium IV 2GHz and Above
RAM 2GB RAM
Monitor: 15” Color Monitor
Keyboard
Mouse

5.4.2 Software Requirements


Operating System Windows 10 XP
Developing Tool Turbo C
Database Files (.txt)

44
5.5 ​References/ Bibliography

Let Us C ++
C Programming in 12 Easy Lessons - Greg Perry
Google.com

45

Das könnte Ihnen auch gefallen