0% found this document useful (0 votes)
9 views

BusReservationSystem REPORT

The document is a project report on a Bus Reservation System implemented in C++ by Gunjan Sharma, under the guidance of Mr. Jai Prakash Bhati. It includes an abstract, system study, requirements, design, implementation, testing, and source code, detailing the functionalities such as adding buses, booking tickets, and displaying reservations. The project aims to provide an efficient and user-friendly system for managing bus reservations using linked lists and queues.

Uploaded by

Gunjan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

BusReservationSystem REPORT

The document is a project report on a Bus Reservation System implemented in C++ by Gunjan Sharma, under the guidance of Mr. Jai Prakash Bhati. It includes an abstract, system study, requirements, design, implementation, testing, and source code, detailing the functionalities such as adding buses, booking tickets, and displaying reservations. The project aims to provide an efficient and user-friendly system for managing bus reservations using linked lists and queues.

Uploaded by

Gunjan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

A PROJECT REPORT

ON

BUS RESERVATION
SYSTEM IN C++
BY

GUNJAN SHARMA (2101321550032)

UNDER THE GUIDANCE OF

Mr. JAI PRAKASH BHATI

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,

GREATER NOIDA INSTITUTE OF TECHNOLOGY ENGG.INSTITUTE, GREATER NOIDA

Dr. A.P.J. Abdul Kalam Technical University, Lucknow

December, 2024

Department of CSE -IOT


Session 2024-2025
Project Completion Certificate
Date: 27/12/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.

Mr. Jai Prakash Bhati Dr. Indradeep Verma

Assistant Professor, CSE-IoT HoD-IoT

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.

Indradeep Verma, for his counsel and assistance when needed.

We are also appreciative of Dr. Dheeraj Gupta, our director, for providing the resources we

needed to complete our project job effectively.


We would like to express our gratitude to all of our friends for their support and helpful

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

2.1 Existing System

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.

Drawbacks of existing system :

• When we use the file system, data can be lost.

• Not efficient

• Difficult to manage the file system


2.2 Proposed System

This proposed system help us to manage Bus Reservation Information . Few features of

this system are:

• This software is more efficient and easy to use.

• Easy to manage

• User can easily understand the operations what is happening in background.

• Here we can add , delete and view the member’s information

• More efficient than the existing system

• The current application provides most unique features than the before systems in current

real world market.

3. SYSTEM REQUIREMENTS

3.1 Hardware Requirements

• Processor : Intel Pentium or any compatible processors

• RAM : 4 GB or above

• Monitor : LCD colour monitor

• Harddisk : 500GB

3.2 Software Requirements

• Operating System: Windows xp/7/8/10

• 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.

2) Show selected bus

3) Display list in booked tickets.

4) Delete buses.

5) Book bus tickets.

6) Display booked tickets.

7) Exit

5.1 Module Description

a) Add buses

Here add new buses.

b) Show selected bus

Here displays the selected bus details.

c) Display list in booked tickets

Here display the whole details of all booked tickets.

d) Delete buses

Here deleted busses.

e) Book bus tickets

Here book a ticket.


5.2 Input Design
The input design is the process of converting the user oriented inputs into the
computer based format. Therefore, the user interface design is very important for any
applications. It defines how the software communicates with in itself to system that
implemented with it and with human who use it. If the interface design is very good, the
user will fall into a software applications.

5.3 Output Design


Computer output is the most important and direct source of information to user
efficient, intelligible output design should improve the system’s relationships with the
user and help in decision making. It provides a means of storage by copying the result for
later reference.

5.4 Data Flow Diagram

A data-flow diagram ( DFD )is a way of representing a flow of a data of a process


or a system. The DFD also provides information about the outputs and inputs of each
entity and the process itself. A data-flow diagram has no control flow, there are no
decision rules and no loops. Specific operations based on the data can be represented by a
flowchart.

Level 0 : Context level diagram


Level 1 : DFD for create member

IMPLEMENTATION AND TESTING


6.1 Implementation

Implementation is the process of putting an action for the

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

iostream, conio and process.

6.2 System Testing

The purpose of testing is to discover errors. Testing is the process of trying to

discover every conceivable fault or weakness in a work product. In system testing, we

combined all the modules and had run the project in Turbo C++ /Dev C++ environment.

First of all, we setup a linked list to


SOURCE CODE

#include<iostream>

#include<fstream>

#include<conio.h>

#include<string.h>

using namespace

std; class Bus

{ int bid;
char destination[200];

char time[50]; int

max_seats; int

booked; int fare;

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;

int getMax(){ return

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()

cout<<"Customer Name "<<name<<"\

n"; cout<<"Details of Bus "<<"\n";

bus.show();

};

void Bus::input()

cout<<"Enter bus id ";

cin>>bid; cout<<"Enter bus

destination ";

cin>>destination;

cout<<"Enter time of bus ";

cin>>time; cout<<"Enter fare

of the bus "; cin>>fare;

}
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;

cout<<"No. of seats remaining "<<max_seats-booked<<endl;

}
int main()

int ch;

fstream

F,G; Bus b;

do

cout<<"Press 1 - Add a Bus"<<endl;

cout<<"Press 2 - Show Selected

Bus"<<endl; cout<<"Press 3 - Display All

Buses"<<endl; cout<<"Press 4 - Delete a

Bus"<<endl; cout<<"Press 5 - Book a ticket

"<<endl; cout<<"Press 6 - Display Booked

Tickets "<<endl; cout<<"Press 7 - Exit


"<<endl; cout<<"Enter your choice ";

cin>>ch;

switch(ch)

case 1:

F.open("tour.dat",ios::app | ios::binary);

b.input();

F.write((char*)&b, sizeof(b)); F.close();

cout<<"Bus added Successfully

"<<endl; getch();

break;

case 2:

int id,chk=0;

cout<<"Enter the bus id to be displayed ";

cin>>id;

F.open("tour.dat",ios::in | ios::binary);
if(F.fail()) cout<<"Can't open

file "<<endl; else

while(F.read((char*)&b,sizeof(b)))

if(b.getid()==id)

{
b.show();

chk=1;

break;

if(chk==0)

cout<<"Bus not Found"<<endl;

F.close();

break;

case 3:
{

F.open("tour.dat",ios::in |

ios::binary); if(F.fail()) cout<<"Can't

open file "<<endl; else

while(F.read((char*)&b,sizeof(b)))

b.display();

F.close();
cout<<"Press a key to continue

"; getch(); break;} case 4:

int chk=0,id;

cout<<"Enter the bus id to be deleted ";

cin>>id;

F.open("tour.dat",ios::in | ios::binary);

G.open("temp.dat",ios::out |

ios::binary); if(F.fail()) cout<<"Can't

open file "<<endl;

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)

cout<<"Bus not Found"<<endl;

else

cout<<"Bus Deleted "<<endl;

F.close();
G.close(); remove("tour.dat");

rename("temp.dat","tour.dat")

; break;}

case 5:

char dest[70],cname[50];

int bid;

Ticket t;

cout<<"Enter the destination ";

cin>>dest;

F.open("tour.dat",ios::in | ios::out |

ios::binary); if(F.fail()) cout<<"Can't open file

"<<endl; else

while(F.read((char*)&b,sizeof(b)))

if(strcmp(b.getDestination(),dest)==0)
{

b.show(); cout<<"Enter the

customer name "; cin>>cname;

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)

cout<<"No Bus Found"<<endl;

}
F.close();
break;}

case 6:

Ticket t;

cout<<"Booked Tickets "<<endl;

G.open("tickets.dat",ios::in |

ios::binary); if(G.fail()) cout<<"can't

open file "<<endl; else

while(G.read((char*)&t,sizeof(t)))

t.display();

G.close();

cout<<"Press a key to continue ";

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

• ISO/IEC 9899:1990(E), Programming Languages — C (ISO C90 and ANSI C89


standard).
• ISO/IEC 9899:1999(E), Programming Languages — C (revised ISO and ANSI C99
standard).
• ISO/IEC 14882:1998(E), Programming Languages—C++ (ISO and ANSI C++ standard).
• ISO/IEC 14882:2003(E), Programming Languages—C++ (updated ISO and ANSI C++
standard including the contents of [C++98] plus errata corrections).
• ISO/IEC JTC1/SC22/WG21/N1711. (Draft) Technical Report on Standard Library
Extensions (ISO C++ committee working document, November 2004). This is a near-
final draft of the extensions to the C++ standard library due to be published in 2005,
including shared_ptr.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy