Bus Ticket Reservation
Bus Ticket Reservation
TABLE OF CONTENTS
1. ABSTRACT 3
2. INTRODUCTION 4
3. SYSTEM STUDY 5
4. SYSTEM DESIGN 7
a. Requirement analysis
b. ER model
7. TESTING 20
8. CONCLUSION 21
9. BIBLIOGRAPHY 22
Bus Ticket Reservation P a g e |3
1. ABSTRACT
Traveling is a large growing business across all countries. Bus reservation system
deals with maintenance of records of details of each passenger who had reserved a seat
for a journey. It also includes maintenance of information like schedule and details of
each bus.
We observed the working of the Bus reservation system and after going through it,
we get to know that there are many operations, which they have to do manually. It takes a
lot of time and causes many errors. Due to this, sometimes a lot of problems occur and
they were facing many disputes with customers. To solve the above problem, and further
maintaining records of items, seat availability for customers, price of per seat, bill
generation and other things, we are offering this proposal of reservation system.
By using this software, we can reserve tickets from any part of the world, through
telephone lines, via internet. This project provides and checks all sorts of constraints so
that user does give only useful data and thus validation is done in an effective way.
Bus Ticket Reservation P a g e |4
2. INTRODUCTION
Our project is to computerize traveling company to manage data, so that all the
transactions become fast and there should not be any error in transaction like calculation
mistake, bill generation and other things. It replaces all the paper work. It keeps records
of all bills also, giving to ensure 100% successful implementation of the computerized
Bus reservation system.
Our reservation system has three modules. First module helps the customer to
enquire the availability of seats in a particular bus at particular date. Second module helps
him to reserve a ticket. Using third module he can cancel a reserved ticket.
Third module deletes values into from the table on cancellation of tickets.
As our application is hosted using IIS Server onto internet it can be accessed by
many number of people concurrently.
.
Bus Ticket Reservation P a g e |5
3. SYSTEM STUDY
System study aims at establishing requests for the system to be acquired, development
and installed. It involves studying and analyzing the ways of an organization currently
processing the data to produce information. Analyzing the problem thoroughly forms the vital
part of the system study. In system analysis, prevailing situation of problem is carefully
examined by breaking them into sub problems. Problematic areas are identified and information
is collected. Data gathering is essential to any analysis of requests. It is necessary that this
analysis familiarizes the designer with objectives, activities and the function of the organization
in which the system is to be implemented.
Existing system is totally on book and thus a great amount of manual work has to be
done. The amount of manual work increases exponentially with increase in bus
services.
Needs a lot of working staff and extra attention on all the records.
In existing system, there are various problems like keeping records of items, seats
available, prices of per/seat and fixing bill generation on each bill.
Finding out details regarding any information is very difficult, as the user has to go
through all the books manually.
The system is very simple in design and to implement. The system requires very low system
resources and the system will work in almost all configurations. It has got following features
Any person across the world, having internet can access this service.
Bus Ticket Reservation P a g e |6
Better Service
This would help the corporation prepare and organize its schedules more efficiently on
the basis of traffic demand.
Bus Ticket Reservation P a g e |7
This proposed software is going to be development using the latest technology from Microsoft
called Microsoft .NET and it is the software that connects information, people, systems, and
devices. It spans clients, servers, and developer tools, consists of:
The .NET Framework 3.0 used for building and running all kinds of software,
including Web-based applications, smart client applications, Mobile applications
etc.
Development tools, such as Microsoft Visual Studio .NET 2010, which provides
an integrated development environment (IDE) for maximizing development
productivity with the .NET Framework.
Microsoft SQL Server 2008 is comprehensive, integrated data management and analysis
software that enables organizations to reliably manage mission-critical information and
confidently run today’s increasingly complex business applications. SQL Server 2008 allows
companies to gain greater insight from their business information and achieve faster results for a
competitive advantage.
SQL Server is the fastest growing Database and Business Intelligence vendor.
SQL Server is more secure than Oracle. Since July 2003 more than 100 critical Oracle
database security vulnerabilities have been identified, compared to ZERO for SQL Server
for that period.
Bus Ticket Reservation P a g e |8
4. SYSTEM SPECIFICATION
4.1. Hardware Requirements:
4.2.Software Requirements:
Operating system : Windows XP (or latest).
5. DATABASE DESIGN
5.1. Conceptual design
a) Requirement Analysis:
List of Entities:
Bus
Passenger
Route
Reserves
List of attributes:
Bus:
a. Bus id
b. Type
a. AC (or) Non-AC
b. Sleeper (or) Not
c. Maximum seats
Route information:
a. Route id
b. To location
c. From location
d. Depart date
e. Depart time
f. Fare
Reserves information:
a. Ticket number
b. Route id
c. Passenger id
Passenger information:
a. Ticket number
b. Name
c. Mobile number
d. E-mail
Bus Ticket Reservation P a g e | 10
List of Relations:
Reserves
Has
b) Er model:
Ticket no Reserves
PID
Passenger
Name
Mobile no.
E mail
Bus Ticket Reservation P a g e | 11
5.2.Logical DB Design
Schema definition:
CREATE TABLE passenger (PID integer primary key,
Name char(20),
Mobile integer,
Email char(20));
Table:
PID Name Mobile E_mail
1 Shivaji 9999999999 [email protected]
2 Pavan 9898989898 [email protected]
Schema definition:
CREATE TABLE bus (BID integer primary key,
Bname char(15),
Max_seats integer,
Type_ac bit,
Type_sleeper bit);
Table:
BID Bname Max_seats Type_AC Type_Sleeper
1 Ganga 28 Yes No
2 Garuda 36 No Yes
6. CODING
******************************************************
******************************************************
**
FILENAME: PROJECT.c
travel agencies.
the
agencies
about buses.
******************************************************
******************************************************
****/
/*~~~~~~~~~~~~HEADER FILES TO BE
Bus Ticket Reservation P a g e | 15
USED~~~~~~~~~~~~~*/
#include<stdio.h>
#include<process.h>
#include<string.h>
#include<conio.h>
/*********~~~~~~~~~~~~~STRUCTURES TO BE
USED~~~~~~~~~~~************/
struct time
int iHrs,iMins;
};
struct bus
int iBusNum;
Bus Ticket Reservation P a g e | 16
int iBusCode;
char chSeat[8][4][20];
char chDrivers_Name[20];
char chGoesTo[20];
char chGoesFrom[20];
float fFare;
int iTicketSold;
};
/*~~~~~~~~~~~~~~~~~~~~~~GLOBAL
VARIABLES~~~~~~~~~~~~~~~~~~~~~~*/
char chEmpty[]="Empty";
char i=':';
/*~~~~~~~~~~~~~~~~~~~~~~FUNCTION
PROTOTYPES~~~~~~~~~~~~~~~~~~~~~~*/
void fnNew_Bus();
void fnMainMenu();
void fnShowBuses();
void fnEmpty();
void fnSeatReservation();
void fnShowStatus();
void fnPrintLine();
void fnDailyReport();
/*****************************************************
***********************
Function main
PARAMETERS:
no parameters....
Type void.
******************************************************
**********************/
void main()
fnMainMenu();
/*****************************************************
**********************
FUNCTION DEFINITIONS
******************************************************
*********************/
Parameters:void
Return type:void
void fnMainMenu()
int iChoice;
printf("\n\n\t\t\t______________________");
printf("\n\n\t\t\t______________________\n");
fnPrintLine();
printf("\n\n\t\t1.Bus Installation");
printf("\n\t\t2.Alottment");
printf("\n\t\t3.Show details");
printf("\n\t\t4.Status");
printf("\n\t\t5.Daily Report");
printf("\n\t\t6.Exit");
fflush(stdin);
scanf("%d",&iChoice);
switch(iChoice)
case 1 : //clrscr();
fnNew_Bus();
break;
case 2: fnSeatReservation();
break;
case 3: fnShowBuses();
break;
case 4: fnShowStatus();
break;
case 5: fnDailyReport();
break;
case 6: exit(0);
getch();
fnMainMenu();
}
Bus Ticket Reservation P a g e | 21
Parameters: void
system
& add the relative information about the new bus ~~~~~~~*/
void fnNew_Bus()
char chChoice;
do{
fnPrintLine();
fflush(stdin);
/*scanf("%d",&stBus[iNumber].iBusNum);
if(stBus[iNumber].iBusNum==0)
goto busN;
}*/
stBus[iNumber].iBusNum=iNumber;
scanf("%d",&stBus[iNumber].iBusCode);
if(stBus[iNumber].iBusCode<1||stBus[iNumber].iBusCode>9999)
goto busC;
/*if(strlen(stBus[iNumber].iBusCode)>20)
goto busC;
}*/
fflush(stdin);
gets(stBus[iNumber].chDrivers_Name);
// puts(stBus[iNumber].chDrivers_Name);
if(strlen(stBus[iNumber].chDrivers_Name)>20)
goto dname;
fflush(stdin);
scanf("%d%c
%d",&stBus[iNumber].stArrival_Time.iHrs,&i,&stBus[iNumber].stArr
ival_Time.iMins);
if(stBus[iNumber].stArrival_Time.iHrs==0)
printf("\n\n\t\tInvalid tTme!!!!");
goto artime;
//if((stBus[iNumber].stArrival_Time.iHrs>57)||
(stBus[iNumber].stArrival_Time.iHrs<48))
//printf("invalid time");
Bus Ticket Reservation P a g e | 24
if((i!=':')||(stBus[iNumber].stArrival_Time.iHrs>=24)||
(stBus[iNumber].stArrival_Time.iHrs<0)||
(stBus[iNumber].stArrival_Time.iMins>=60)||
(stBus[iNumber].stArrival_Time.iMins<0))
printf("\n\t\tInvalid Time!!!!\n");
printf("\t\tEnter only--hh:mm!!!!");
goto artime;
fflush(stdin);
scanf("%d%c
%d",&stBus[iNumber].stDeparture_Time.iHrs,&i,&stBus[iNumber].s
tDeparture_Time.iMins);
if(stBus[iNumber].stDeparture_Time.iHrs==0)
printf("\t\tinvalid Time!!!!");
goto deptime;
if((i!=':')||(stBus[iNumber].stDeparture_Time.iHrs>=24)||
(stBus[iNumber].stDeparture_Time.iHrs<0)||
Bus Ticket Reservation P a g e | 25
(stBus[iNumber].stDeparture_Time.iMins>=60)||
(stBus[iNumber].stDeparture_Time.iMins<0))
printf("\n\t\tInvalid Time!!!!");
printf("\n\t\tEnter only--hh:mm");
goto deptime;
from: printf("\n\tFrom:\t");
fflush(stdin);
gets(stBus[iNumber].chGoesFrom);
if(strlen(stBus[iNumber].chGoesFrom)>20)
goto from;
to: printf("\n\tTo:\t");
fflush(stdin);
gets(stBus[iNumber].chGoesTo);
if(strlen(stBus[iNumber].chGoesTo)>20)
{
Bus Ticket Reservation P a g e | 26
goto to;
printf("\n\tFare:\t");
fflush(stdin);
scanf("%f",&stBus[iNumber].fFare);
stBus[iNumber].iTicketSold=0;
printf("\n");
fnEmpty();
fnPrintLine();
// printf("%s",stBus[iNumber].chGoesFrom);
// printf("%s",stBus[iNumber].chGoesTo);
bus(y/n)?? ");
fflush(stdin);
scanf("%c",&chChoice);
// printf("%c",chChoice);
iNumber++;
Bus Ticket Reservation P a g e | 27
//printf("%d",iNumber);
}while(chChoice=='y'||chChoice=='Y');
fnMainMenu();
Parameters: void
void fnShowBuses()
int i1;
printf("\n\n\t\t\t______________________");
printf("\n\n\t\t\t______________________\n");
Bus Ticket Reservation P a g e | 28
for(i1=1;i1<iNumber;i1++)
printf("\n");
fnPrintLine();
printf("\n\t\tbus no-\t\t%d",stBus[i1].iBusNum);
printf("\n\t\tbus code-\t%d",stBus[i1].iBusCode);
printf("\n\t\tDrivers Name-\t%s",stBus[i1].chDrivers_Name);
printf("\n\t\tFrom-\t\t%s",stBus[i1].chGoesFrom);
printf("\n\t\tTo-\t\t%s",stBus[i1].chGoesTo);
printf("\n\t\tArrival time-\t%d%c
%d",stBus[i1].stArrival_Time.iHrs,i,stBus[i1].stArrival_Time.iMins);
printf("\n\t\tDeparture time-\t%d%c
%d",stBus[i1].stDeparture_Time.iHrs,i,stBus[i1].stDeparture_Time.i
Mins);
printf("\n\t\tFare-\t\t%.4f",stBus[i1].fFare);
printf("\n\t\tTickets Sold-\t%d",stBus[i1].iTicketSold);
printf("\n");
fnPrintLine();
//fflush(stdout);
}
Bus Ticket Reservation P a g e | 29
getch();
fnMainMenu();
Parameters:void
Return type:void
unreserved seatin a
void fnSeatReservation()
//char arrSize[8][4];
char chName[20];
int iBusN;
int iSeat;
char chChoice;
printf("\n\n\t\t\t______________________");
Bus Ticket Reservation P a g e | 30
printf("\n\n\t\t\t ALLOTMENT");
printf("\n\n\t\t\t______________________\n");
fnPrintLine();
fflush(stdin);
scanf("%d",&iBusN);
if(iBusN>=iNumber)
fnSeatReservation();
fflush(stdin);
scanf("%d",&iSeat);
if(iSeat>32)
goto seat;
else if(strcmp(stBus[iBusN].chSeat[iSeat/4][(iSeat%4)-
Bus Ticket Reservation P a g e | 31
1],"Empty")==0)
name: fflush(stdin);
gets(chName);
if(strlen(chName)>20)
goto name;
else
strcpy(stBus[iBusN].chSeat[iSeat/4][iSeat%4-1],chName);
stBus[iBusN].iTicketSold++;
fflush(stdin);
chChoice=getchar();
if(chChoice=='y'||chChoice=='Y')
fnSeatReservation();
else
Bus Ticket Reservation P a g e | 32
fnMainMenu();
}else
fflush(stdin);
chChoice=getchar();
if(chChoice=='y'||chChoice=='Y')
fnSeatReservation();
else
fnMainMenu();
void fnDailyReport()
{ int i;
double dDailyTotal=0;
double dBusTotal=0;
Bus Ticket Reservation P a g e | 33
printf("\n\n\t\t\t______________________");
printf("\n\n\t\t\t______________________\n");
fnPrintLine();
for(i=1;i<iNumber;i++)
{ dBusTotal=stBus[i].iTicketSold*stBus[i].fFare;
%d",i,stBus[i].iTicketSold);
printf("\n\t\t\tTotal Fare-\t%.4lf\n",dBusTotal);
dDailyTotal+=dBusTotal;
printf("\n\n\t\t\tDaily Total=\t%lf",dDailyTotal);
getch();
fnMainMenu();
Parameters:void
Bus Ticket Reservation P a g e | 34
Return type:void
void fnEmpty()
for(int i=0;i<8;i++)
for(int j=0;j<4;j++)
strcpy(stBus[iNumber].chSeat[i][j],chEmpty);
Parameters:void
Return type:void
Bus Ticket Reservation P a g e | 35
void fnShowStatus()
int iBusN,index=0,j,k;
char chChoice;
fflush(stdin);
scanf("%d",&iBusN);
if(iBusN>=iNumber)
fnShowStatus();
else
fnPrintLine();
%s",stBus[iBusN].iBusCode,stBus[iBusN].chDrivers_Name);
%d",stBus[iBusN].stArrival_Time.iHrs,i,stBus[iBusN].stArrival_Time.
iMins,stBus[iBusN].stDeparture_Time.iHrs,i,stBus[iBusN].stDepartur
e_Time.iMins);
printf("\nFrom-\t\t%s\t\tTo-\t\t
%s",stBus[iBusN].chGoesFrom,stBus[iBusN].chGoesTo);
printf("\nFare-\t\t%f\tTickets Sold-\t
%d",stBus[iBusN].fFare,stBus[iBusN].iTicketSold);
printf("\n");
fnPrintLine();
for(j=0;j<8;j++)
printf("\n");
for(k=0;k<4;k++)
{ index++;
printf("%d .%s\t",index,stBus[iBusN].chSeat[j][k]);
fflush(stdin);
chChoice=getchar();
Bus Ticket Reservation P a g e | 37
if(chChoice=='y'||chChoice=='Y')
fnShowStatus();
else
fnMainMenu();
Parameters:void
Return type:void
of separation.~~~~~~~*/
void fnPrintLine()
{ int j;
for(j=0;j<60;j++)
printf("*");
}
Bus Ticket Reservation P a g e | 38
SCREEN LAYOUTS
Reservation and enquire
Screen layout:
Bus Ticket Reservation P a g e | 39
7. TESTING
8. BIBLIOGRAPHY
Printed referential:
Electronic Referential:
The following websites were used for information gathering about the project. These
websites also gave adequate information for the project to be successfully completed.
1. http://www.srikanthtechnologies.com/
Bus Ticket Reservation P a g e | 40
Thanks