Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

BIPIN TRIPATHI KUMAON INSTITUTE OF TECHNOLOGY, DWARAHAT

DEPARTMENT OF COMPUTER SCIENCE

REPORT FILE ON PROJECT

ONLINE BUS RESERVATION SYSTEM

Presented by:
Nishant chauhan
Mca 1yr 2sem
190180600003
TABLE OF CONTENTS

 Introduction
 Requirement Analysis

 Design

 Conclusion

 Source code

 References
INTRODUCTION

Online Bus Ticket Reservation System is


Windows based application that works
within centralized network. The software
program “Online Bus Reservation System”
provides bus transportation system, a facility
to reserved seats, cancellation of seats and
different types of enquiry which need an
instant and quick reservation. OBTRS is built
for manage and computerize the traditional
database, ticket booking and tracking bus
and travel made easy. It maintains all data of
users, bus details, reservation details,
booking details, customer details.
ANALYSIS

 Requirement analysis is a software


engineering task that bridges the gap
between the system level software
allocation and software design.
 It enables the system engineer to
specify software function and
performance, indicate software interface
with other system elements, and
establish design constraints that the
software must meet.
 It provides the software designer
with a representation of information and
function that can be translated to data,
architectural and procedural design.
SCOPE

 The scope of the online bus ticket


reservation system is: A person should be
able to
 Login to the system through the first
page of the application
 Change the password after logging
into the system
 Should be able to create a new login
for the accessing the reservation facility.
 Query the buses for two weeks (Only
two weeks advance reservation is
available).
 No reservation before two days can
be done.
 Able to choose the seats which are
available for a certain class.
 Give details about the credit card.
 Improved & optimized service.
 Freight Revenue enhancement.
CONCLUSION

 This system is user friendly and


accurate.

 This system is available 24 hours and


efficient in reservation.

 It has no hidden costs in fares.


Important Features

 It simplifies the tasks and reduces


paper work.

 Accuracy.

 User Friendly.

 Availability.

 Efficiency.

 Reliable.

 Durable.
LIMITATIONS

 Monthly maintenance cost required.

 Cannot be operated by all types of


users.
SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class bus
{
private:
char name[20];
char address[20];
int age;
int busno;
int seatno;
char from[20];
char to[20];
public:
void input();
void display();
};
void bus::input()
{
cout<<"enter your name.\n";
cin>>name;
cout<<"enter your age.\n";
cin>>age;
cout<<"enter your address.\n";
cin>>address;
cout<<"enter bus no.\n";
cin>>busno;
cout<<"enter your place from where you are starting your journey.\n";
cin>>from;
cout<<"enter your leaving point where you want to leave a bus.\n";
cin>>to;
cout<<"enter a seat no. which you want to book.\n";
cin>>seatno;
}
void bus::display()
{
cout<<"\nyour details are:";
cout<<"\nname:"<<name;
cout<<"\nage:"<<age;
cout<<"\naddress:"<<address;
cout<<"\nfrom:"<<from;
cout<<"\nto:"<<to;
if(busno==1666||busno==1289||busno==1089)
{
cout<<"\nbus no:"<<busno;
}
else
{
cout<<"\nyou have entered a wrong busno,please entered a correct
bus no. ";
}
if(seatno<30)
{
cout<<"\nseatno:"<<seatno;
}
else
{
cout<<"\nyou have entered a wrong seatno,please entered a correct
bus no because there are only 30 seats ina bus.";
} if((busno==1666&&seatno<30)||
(busno==1089&&seatno<30)||(busno==1289&&seatno<30))
{
switch(seatno)
{
case 1 : cout<<"\nyou have booked seatno=1\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1 \n";
break;
case 2 : cout<<"\n you have booked seatno=2\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 3 : cout<<"\n you have booked seatno=3\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 4 : cout<<"\n you have booked seatno=4\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 5 : cout<<"\n you have booked seatno=5\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 6 : cout<<"\n you have booked seatno=6\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 7 : cout<<"\n you have booked seatno=7\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 8 : cout<<"\n you have booked seatno=8\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 9 : cout<<"\n you have booked seatno=9\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 10 : cout<<"\n you have booked seatno=10\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 11 : cout<<"\n you have booked seatno=11\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 12 : cout<<"\n you have booked seatno=12\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 13 : cout<<"\n you have booked seatno=13\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 14 : cout<<"\n you have booked seatno=14\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 15 : cout<<"\n you have booked seatno=15\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 16 : cout<<"\n you have booked seatno=16\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 17 : cout<<"\n you have booked seatno=17\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 18 : cout<<"\n you have booked seatno=18\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 19 : cout<<"\n you have booked seatno=19\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 20 : cout<<"\n you have booked seatno=20\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 21 : cout<<"\n you have booked seatno=21\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 22 : cout<<"\n you have booked seatno=22\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 23: cout<<"\n you have booked seatno=23\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 24 : cout<<"\n you have booked seatno=24\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 25 : cout<<"\n you have booked seatno=25\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 26 : cout<<"\n you have booked seatno=26\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 27 : cout<<"\n you have booked seatno=27\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 28 : cout<<"\n you have booked seatno=28\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 29 : cout<<"\n you have booked seatno=29\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
case 30 : cout<<"\n you have booked seatno=30\n:"<<"seat booked
passenger name:"<<name;
cout<<"\nseat is reserved";
cout<<"\navailable seat=29 booked seat=1\n";
break;
}
}
else
{
cout<<"\nseat is not reserved";
}
}
int main()
{
clrscr();
int n,i,y;
char ch,d,q;
cout<<"1.bus details\n";
cout<<"2.ticket book\n";
cout<<"3.exit\n";
cout<<"enter your choice\n";
cin>>n;
switch(n)
{
case 1:cout<<"BUS DETAILS:-\n";
cout<<"BUS NAME BUS NO. BUS
DRIVER NAME\n";
cout<<"1.Haldwani express 1089 Yogesh\n";
cout<<"2.Roorkee express 1666 Rohit\n";
cout<<"3.Moradabad express 1289 Akshay\n";
cout<<"\nif you want to quit press 'y',if not so press other
character:\n";
cin>>q;
if(q=='y'|| q=='Y')
{
exit(1);
}
else
{
main();
}
break;
case 2: cout<<"Book your ticket:-\n";
cout<<"total seats available in the bus is 1 to 30:-\n";
for(i=1;i<=30;i++)
{
cout<<i<<".empty"<<"\t";
}
cout<<"\nenter your details to book a
seat:-\n";
bus s;
s.input();
s.display();
cout<<"\nif you want to quit press 'y',if not so
press other character:\n";
cin>>q;
if(q=='y'|| q=='Y')
{
exit(1);
}
else
{
main();
}
break;
case 3: cout<<"\nif you want to quit press 'y',if not so press
other character:\n";
cin>>q;
if(q=='y'|| q=='Y')
{
exit(1);
}
else
{
main();
}
break;
default: cout<<"you have entered a wrong choice:\n";

}
getch();
}
Output
enter bus no.
1666
enter your place from where you are starting your journey.
kashipur
enter your leaving point where you want to leave a bus.
haldwani
enter a seat no. which you want to book.
5

your details are:


name:nishant
age:22
address:kashipur
from:kashipur
to:haldwani
bus no:1666
seatno:5
you have booked seatno=5
seat booked passenger name:nishant
seat is reserved
available seat=29 booked seat=1

if you want to quit press 'y',if not so press other character:


y
References
 http://en.wikipedia.org

 http://www.google.co.in/
THANK
YOU

You might also like