BusReservationSystem REPORT
BusReservationSystem REPORT
ON
BUS RESERVATION
SYSTEM IN C++
BY
December, 2024
This is to certify that Mr. Ritik Sharma bearing Roll No.2201321559007, student of
4th year CSE-IoT has completed project program (KCS-752) with the Department of
CSE-IoT from 26-Sep-24 to 26-Dec-24.
He worked on the Project Titled “Bus Reservation System in C++” under the
guidance of Mr. Jai Prakash Bhati.
This project work has not been submitted anywhere for any degree.
ACKNOWLEDGEMENT
We would like to sincerely thank Mr. Jai Prakash Bhati, our project coordinator, and all of
the professors for their counsel, inspiration, and unwavering support over the course of our
project work. Without their assistance and insightful recommendations, our task would not
have been feasible. We are deeply grateful to our esteemed Department Head, CSE-IoT Dr.
We are also appreciative of Dr. Dheeraj Gupta, our director, for providing the resources we
advice throughout this effort. Finally, we have no words to express our sincere gratitude to
our parents who have shown us this world and for everything they have given to us.
ABSTRACT
Bus reservation system is a very simple application showing the implementation of class along
with the object of C++ language. Here bus seat reservation using linked list and queue. This
application is very simple to understand, and it will help you learn how to create class and object
in your C++ application. Here, the user can perform tasks like install bus information, reserve
bus seat, show reservation information and show information regarding the buses available.
CONTENTS
1. INTRODUCTION
2. SYSTEM STUDY
2.1 EXISTING SYSTEM
2.2 PROPOSED SYSTEM
3. SYSTEM REQUIREMENTS
3.1 HARDWARE REQUIREMENTS
3.2 SOFTWARE REQUIREMENTS
4. SYSTEM ANALYSIS
4.1 FEASIBILITY STUDY
4.2 TECHNICAL FEASIBILITY
4.3 ECONOMICAL FEASIBILTY
4.4 SOCIAL FEASIBILITY
4.5 BEHAVIOURAL FEASIBILITY
4.6 ABOUT THE PROJECT
5. SYSTEM DESIGN
5.1 MODULE DESCRIPTION
5.2 INPUT DESIGN
5.3 OUTPUT DESIGN
5.4 DATA FLOW DIAGRAM (DFD)
6. IMPLEMENTATION AND SYSTEM TESTING
6.1 IMPLEMENTATION
6.2 SYSTEM TESTING
7. SOURCE CODE
8. OUTPUT SCREENSHOTS
9. CONCLUSION
10. BIBLIOGRAPHY
1. INTRODUCTION
Simple Bus Reservation System is based on the concept of reserving bus seats for the
passengers. There’s no login system available for this system, the user can freely use its
feature. This mini project contains limited features, but the essential one. Make sure that you
install the code editor for C programming to run the project. Talking about the features of this
Simple system, the user can view bus list, book tickets, modify bus record and check bus
status board. While booking tickets, the user has to enter bus number then the system
displays total bus seat numbers with passengers name and the user has to enter the number of
tickets, seat number, and name of the person.
Functions
a) Add buses.
b) Show selected bus
c) Display list in booked tickets.
d) Delete buses.
e) Book bus tickets.
f) Display booked tickets.
Objectives
The main objective of this case study is to study C++ Linked list application and also
how to deal with that. By using this, we can add and delete club member’s information,
understand the club information in a linked list and how it will be processed.
2. SYSTEM STUDY
Existing system is file system method is a type of data storing method where we can save
the data. Most of the operations in the existing system of this project is to do basic operations.
• Not efficient
This proposed system help us to manage Bus Reservation Information . Few features of
• Easy to manage
• The current application provides most unique features than the before systems in current
3. SYSTEM REQUIREMENTS
• RAM : 4 GB or above
• Harddisk : 500GB
• C++
4. SYSTEM DESIGN
System design is the process of the problem solving and planning for a software solution. A
software design may be as simple as a flowchart or text describing a planned sequence of events.
In other case, some documentation of the plan is usually the product of the design. A software
design may be platform independent or platform specific, depending on the availability of the
technology called for by the design.
Mainly we have 7 modules. They are:
1) Add buses.
4) Delete buses.
7) Exit
a) Add buses
d) Delete buses
formulated plan. Before we implement, the plan should have been completed and our
objectives should be clear. Testing each one of those actions formulated in the plan is said
to be implementation testing.
Here we are using C++ language to implement this tool. Also included header files
combined all the modules and had run the project in Turbo C++ /Dev C++ environment.
#include<iostream>
#include<fstream>
#include<conio.h>
#include<string.h>
using namespace
{ int bid;
char destination[200];
max_seats; int
public:
Bus()
{
bid=0; max_seats=10;
booked=0; fare=0;
strcpy(time,"9:10am")
strcpy(destination,"");
void input();
void show();
void
display(); int
getid()
return bid;
void book()
booked++;
}
char* getDestination()
return destination;
}
char* getTime()
return time;
int getBooked()
{ return booked;
max_seats;
int getFare()
return fare;
};
class Ticket
char
name[50]; Bus
bus; public:
void generate(char cname[], Bus tb)
{
strcpy(name,cname);
bus=tb;
void display()
bus.show();
};
void Bus::input()
destination ";
cin>>destination;
}
void Bus::display()
{
cout<<bid<<"\t"<<destination<<"\t\t"<<time<<"\t"<<max_seats<<"\t"<<booked<<"\
t"<<fare<<"\n";
}
void Bus::show()
cout<<"Bus Id "<<bid<<endl;
cout<<"Desination
"<<destination<<endl; cout<<"Time
"<<time<<endl;
}
int main()
int ch;
fstream
F,G; Bus b;
do
cin>>ch;
switch(ch)
case 1:
F.open("tour.dat",ios::app | ios::binary);
b.input();
"<<endl; getch();
break;
case 2:
int id,chk=0;
cin>>id;
F.open("tour.dat",ios::in | ios::binary);
if(F.fail()) cout<<"Can't open
while(F.read((char*)&b,sizeof(b)))
if(b.getid()==id)
{
b.show();
chk=1;
break;
if(chk==0)
F.close();
break;
case 3:
{
F.open("tour.dat",ios::in |
while(F.read((char*)&b,sizeof(b)))
b.display();
F.close();
cout<<"Press a key to continue
int chk=0,id;
cin>>id;
F.open("tour.dat",ios::in | ios::binary);
G.open("temp.dat",ios::out |
else
while(F.read((char*)&b,sizeof(b)))
if(b.getid()!=id)
G.write((char*)&b,sizeof(b));
else
b.show();
chk=1;
}
}
if(chk==0)
else
F.close();
G.close(); remove("tour.dat");
rename("temp.dat","tour.dat")
; break;}
case 5:
char dest[70],cname[50];
int bid;
Ticket t;
cin>>dest;
F.open("tour.dat",ios::in | ios::out |
"<<endl; else
while(F.read((char*)&b,sizeof(b)))
if(strcmp(b.getDestination(),dest)==0)
{
b.book();
t.generate(cname,b);
G.open("tickets.dat",ios::app | ios::binary);
G.write((char*)&t,sizeof(t));
G.close();
// F.seekp(F.tellg()-sizeof(b),ios::beg);
F.write((char*)&b,sizeof(b));
cout<<"Ticket booked"<<endl;
getch();
break;}
int chk;
if(chk==0)
}
F.close();
break;}
case 6:
Ticket t;
G.open("tickets.dat",ios::in |
while(G.read((char*)&t,sizeof(t)))
t.display();
G.close();
getch();}
}
}
while(ch!
=7); return 0;
}
SCREENSHOTS
9. CONCLUSION
This software tool named “BUS RESERVATION SYSTEM” helps to
manage reservaed information in linked list. We have given the option add the details of
buses, view the details, the user can perform tasks like install bus information, reserve
bus seat, show reservation information and show information regarding the buses
available. We can improve efficiency of the system, Less human error, Strength and
Strain of manual labour can be reduced, High Security, Data Consistency, Easy to handle,
Easy data updating, Easy record keeping.
REFERENCE
10. REFERENCE