0% found this document useful (0 votes)
195 views43 pages

Bus Reservation Internship Report

The document discusses developing a bus reservation system using C programming language. It would include storing information about bus seats and passengers in data structures like arrays or linked lists. The system would allow users to check seat availability, make reservations, cancel reservations and view passenger details through a menu-driven user interface.

Uploaded by

Mani
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)
195 views43 pages

Bus Reservation Internship Report

The document discusses developing a bus reservation system using C programming language. It would include storing information about bus seats and passengers in data structures like arrays or linked lists. The system would allow users to check seat availability, make reservations, cancel reservations and view passenger details through a menu-driven user interface.

Uploaded by

Mani
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/ 43

Bus Reservation System using C programming language

Page | 2
Bus Reservation System using C programming language

ABSTRACT
The Bus Reservation System is a software application developed using the
C programming language. The purpose of the system is to allow users to book bus
Page | 3
Bus Reservation System using C programming language

tickets and manage bus schedules. The system has various features such as user
registration, login, bus route management, ticket booking, and ticket cancellation.
The system is designed to be user-friendly and efficient, allowing users to quickly
and easily book tickets for their desired bus routes. The code is well-structured,
modular, and follows good coding practices.

The project is suitable for both small and large-scale bus operators who are
looking for an efficient and reliable system to manage their bus reservation
process. Overall, the Bus Reservation System project is a useful application for
anyone who wants to streamline their bus reservation process and provide a
seamless booking experience to their customers . In conclusion, the bus reservation
system using C is a reliable and efficient system for managing the bus reservation
process. It simplifies the ticket booking process for users, and it is suitable for
small and large-scale bus operators.

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of


any task would be incomplete without thanking the people who made it possible.

Page | 4
Bus Reservation System using C programming language

I seek the blessings of LORD SHIVA and SWAMI VIVEKANANDA


and seeking the divine blessings of Parama poojya, Padmabhushana SRI SRI
SRI Dr. BALAGANGADARANATHA MAHA SWAMIJI, I express my
sincere and humble pranamas to his holiness, SRI SRI SRI
NIRMALANANDANATHA MAHA SWAMIJI and SRI SRI GUNANATHA
SWAMIJI and seek their blessings.

I am grateful to our beloved Principal Dr. SANJAY PANDEY M B for


his kind support and encouragement.

I take this opportunity to express my profound sense of gratitude to our


Head of the Department for their kind and co-operation
Mr. KEERTHI PRASAD G providing the best help, support, encouragement,
and vast amount of patience.

It is great pleasure to thank our Coordinator Mr. RANGASWAMY H for


his constant encouragement, support and suggestions.

I take this opportunity to express my profound sense of gratitude to ,


Mr.RANGASWAMY H Assist Professor, for his excellent guidance,
supervision, constant encouragement, support and constructive suggestions. My
affection towards sir made me feel happy always and filled in me the spirit of
doing things nicely.

I wish to thank Mrs. ASHA K professor, dept of AI&ML for her constant
encouragement, support and concern.

ii

My special thanks to Miss .MUKTHA, Mrs .AKSHATHA A M S, Mrs.


KAVYASHREE B L, Mr. MALTESH for their support, care and concern.

Page | 5
Bus Reservation System using C programming language

I wish to thank all the faculty members and non teaching staff, Department
of Artificial intelligence & Engineering, for their excellent encouragement and
wishes.

I am very much indebted to my beloved parents and family members for


their continuous support and encouragement.

N S Manikanta R
(4GM21AI032)

III

Page | 6
Bus Reservation System using C programming language

Page | 7
Bus Reservation System using C programming language

CONTENTS

ABSTRACT

ACKNOWLEDGEMENT

LIST OF FIGURES

1. Introduction

1.1 Preamble

1.2 Bus reservation system over view

1.3 Scope of the project

1.4 Problem definition

1.5 Objectives of the project

1.6 Motivation of the project

1.7 Organization of report

1.8 Summary

2. Specification of programming language and other requirements

2.1 Specification of VS code software

2.2 Minimum hardware requirements

2.3 Software requirements

2.4 Summary

3. Overview of optical character recognition

3.1 System architecture for Bus Reservation System

3.1.1 General steps for Bus Reservation System

3.2 Summary

Page | 8
Bus Reservation System using C programming language

4.Approches for bus reservation system

4.1 Flow charts for login module using approach-1

4.2 Flow chart for booking module using approach-2

4.3 Flow chart for ticket cancel module using approach-3

4.4 Summary

5.Implementation

5.1 Pseudo code for display bus details using approach-1

5.2 Pseudo code for register a new user using approach-2

5.3 Pseudo code for login using approach-3

5.4 Pseudo code for book a bus using approach-4

5.5 Pseudo code to add balance a user account using approach-5

5.6 Pseudo code to refund a user booking using approach-6

5.7 Summary

6.Results and Discussion

6.1 Results and analysis of the approaches for bus reservation system

6.1.1 Approache-1

6.1.2 Approache-2

6.1.3 Approache-2

6.1.4 Approache-3

6.2 Summary

Page | 9
Bus Reservation System using C programming language

7. Conclusion and Future work

7.1 Conclusion

7.2 Future work

Page | 10
Bus Reservation System using C programming language

Chapter 1

INTRODUCTION
(In this chapter, preamble, overview of Bus Reservation System, scope of the
project, problem definition, objectives are discussed)

CHAPTER-1
Page | 11
Bus Reservation System using C programming language

INTRODUCTION

1.1 Preamble

The importance of Bus Reservation System Software has increased


from last two decades. This is because Growth of Technology from last
two decades and development of smartphones and online transactions. By
bringing the software to book bus tickets from any place can possible to
achieve greater productivity enhancements. To manage all the bus routes
and Tickets distribution becomes more efficient. Reduces the paper work
for making tickets.
Due to evolution in information technology, more emphasis is
given to paperless business processing, transactions and communications.
By User friendly environment anyone can easily book his bus ticket
easily.
It’s a E-booking interactive console which allows book his/her
ticket. A facility to reserve seats, cancellation of reserved seats and
different types of route enquiries uses on securing quick reservation.

1.2 Bus Reservation System-An Overview

To create a bus reservation system using C, you would typically need to


use data structures such as arrays or linked lists to store information about
the available seats on a bus, as well as information about passengers who
have reserved seats. You would also need to implement functions to
display the available seats, reserve a seat for a passenger, cancel a
reservation, and display information about the passengers who have
reserved seats. Additionally, you might want to implement file
input/output functions to store and retrieve information about reservations.
1. Data Structures:
You would need to create data structures to store information
about the seats on the bus and the passengers who have reserved
those seats. You can use an array or a linked list to store
information about the seats. You can create a structure to store

Page | 12
Bus Reservation System using C programming language

information about the passenger, such as name, age, gender, seat


number, etc.
2. User Interface:
You need to design a user interface that allows the user to interact
with the system. You can use the console to display the menu and
get input from the user.
3. Menu:
You need to create a menu that allows the user to perform
different operations, such as checking available seats, reserving a
seat, canceling a reservation, displaying passenger information,
etc.
4. Functions:
You need to implement different functions that perform the
operations mentioned in the menu. For example, you can create a
function to display the available seats, reserve a seat for a
passenger, cancel a reservation, and display passenger
information.
5. File Input/Output:
You can also add file input/output functions to store and retrieve
information about reservations. For example, you can create a
function to read from a file and load the data into the system.
Similarly, you can create a function to save the data to a file.
6. Error Handling:
You need to handle errors that may occur during the execution of
the program. For example, if a passenger tries to reserve a seat that
is already taken, the system should display an error message.
7. Testing:
Finally, you need to test the system thoroughly to ensure that it
works as expected. You can create test cases for each function and
make sure that the system handles all possible scenarios.
1.3 Scope of the project
The proposed project can be used in several situations, some of them are
 Improved customer experience

Page | 13
Bus Reservation System using C programming language

 Streamlined operations

 Better resource utilization


 Increased revenue

1.4 Problem definition


To design Bus Reservation System using C programming language.
1.5 Objectives of the Project
The objective of a bus reservation system using C language can be to
allow users to reserve seats on buses for their travel. The system should be
able to perform the following tasks:
 Allow users to select a bus based on their preferences such as the
type of bus, seat layout, etc.
 Allow users to select a bus based on their preferences such as the
type of bus, seat layout, etc.
 Allow users to select a seat on the chosen bus
 Allow users to make payments for the reservation
 Generate a ticket with the details of the reservation
1.6 Motivation for the project
 Its various practical applications and need to the society.

 By making Ticket booking digitalized we can prevent use paper


work which is good for society and environment.
1.7 Organization of report
The project report is organized as follows:
Chapter 2 - Specification of programming language and other
requirements
This chapter presents a brief description of the software used in
project along with other software and hardware requirements
Chapter 3 – Overview of the Bus Reservation System
This chapter presents the system architecture and the stages of
architecture.
Chapter 4 – Approaches for Bus reservation system

Page | 14
Bus Reservation System using C programming language

This chapter includes flow charts and description of different


approaches for bus reservation system.
Chapter 5 – Implementation
This chapter has pseudo code and implementation details.
Chapter 6 – Results and discussions.

This chapter deals with experimental results and analysis.

Chapter 7- Conclusion and future work

This chapter gives the conclusion of the project and the possible
future enhancements.

1.8 Summary

This chapter introduces Bus reservation system in section 1.1. An


overview of Bus reservation system is discussed in section 1.2. Scope of the
project is listed in section 1.3. Problem definition is depicted in section 1.4. The
objectives are clearly mentioned in section 1.5. Section 1.6 presents motivations
for the project work. 1.7 and organization of the report is given in section and
Summary is given section 1.8.

Page | 15
Bus Reservation System using C programming language

Chapter 2

SPECIFICATION OF
PROGRAMMING LANGUAGE AND
OTHER REQUIREMENTS
(In this chapter, specification of hardware and software requirements
are discussed)

Page | 16
Bus Reservation System using C programming language

CHAPTER-2

SPECIFICATION OF PROGRAMMING LANGUAGE


AND OTHER REQUIREMENTS
This chapter gives overview and specification of C
programming language which is used for implementation of
proposed work. It also specifies other related requirements required
for normal operation of C language and project. A best
specification gives complete statement of what the system is to do
and is used as the basis for system design.

2.1 Specification of VS code software

 VS code IDE
Visual Studio Code (often abbreviated as VS Code) is a popular
free and open-source code editor developed by Microsoft. It supports a
wide range of programming languages and frameworks and is highly
customizable through its extensive plugin and extension ecosystem.

Some of the key features of VS Code include:

 Cross-platform support: VS Code is available for Windows,


Mac, and Linux.
 IntelliSense: A feature that provides intelligent code
completion, syntax highlighting, and other helpful suggestions
as you type.
 Debugging: VS Code supports debugging for many languages,
including Node.js, Python, C++, and more.
 Git integration: VS Code has built-in support for Git version
control, making it easy to manage and commit code changes.
 Customizability: VS Code can be customized extensively

through themes, key bindings, and extensions.

Page | 17
Bus Reservation System using C programming language

 Collaboration: VS Code has features that support collaboration,


such as Live Share, which allows multiple users to work on the
same codebase in real-time.

2.2 Minimum hardware requirements


• Processor : Dual core Pentium 4

• RAM : 2 GB

• Hard disk : 40GB

• Disk space : 1GB for VS code only,3-4 GB for


installation

2.3 Software requirements

• Operating system : Windows

• Programming language :C

• IDE : VS code

2.4 Summary
This chapter includes the specific requirements in section 2.1. Minimum
hardware requirements for the project are detailed in section 2.2 and software
requirements are specified in section 2.3.

Page | 18
Bus Reservation System using C programming language

Chapter 3

OVRVIEW OF BUS RESERVATION


SYSTEM
(In this chapter, system architecture of Bus Reservation
system and steps in architecture are discussed)

Page | 19
Bus Reservation System using C programming language

CHAPTER – 3

OVRVIEW OF BUS RESERVATION SYSTEM

3.1 System architecture of bus reservation system

In bus reservation system using C programming language, there are


various modules that can be involved depending on the system's design and
requirements. However, the proposed system framework is as shown in figure 3.1.
It contains the following steps:

3.1.1 General steps for BUS RESERVATION SYSTEM

Page | 20
Bus Reservation System using C programming language

 Login Module:

This module handles the authentication of users, which can include


customers, bus operators, and administrators. The module is responsible
for checking the credentials provided by the user and verifying their
identity.

 Booking Module:
This module handles the process of booking a bus ticket. It allows
customers to search for available buses, select a seat, and make a payment.
The module also updates the seat availability and generates a ticket for the
customer.
 Bus Information Module:
This module stores information about the buses, including their
routes, schedules, and availability. It is responsible for updating the
availability of buses and seats as customers book and cancel their tickets.
 Bus Status Module:
This Module stores the information about the bus seats and seats
available reservation and seat arrangement by this user can easily book his
seat.

3.2 Summary

This chapter presents modules that are used in bus reservation system. The
system architecture for Bus reservation system are briefly explained in section 3.1.

Page | 21
Bus Reservation System using C programming language

Chapter 4

APPROACHES FOR BUS


RESERVATION SYSTEM
(In this chapter, flow charts of Bus reservation system discussed)

Page | 22
Bus Reservation System using C programming language

CHAPTER 4

APPROACHES FOR BUS RESERVATION SYSTEM

(In this chapter, different approaches for bus reservation system are discussed)

4.1 Flow chart for Login Module approach-1

Figure 4.1: Flowchart for bus reservation system using approach-1.

The flowchart for bus reservation system using approach-1 is as shown in figure

4.1. Stepwise description of flowchart as follows.

 Input username and password from the user.


 If the username and password given by user will be verified once by
system if user credentials are matched then it allows to main menu else
exit.

Page | 23
Bus Reservation System using C programming language

4.2 Flow chart for Booking Module using approach-2

Figure 4.2: flowchart for booking module using approach-2

The flowchart for booking module approach-2 is as shown in figure

4.2. Stepwise description of flowchart as follows.

 Input bus_no from user.


 If bus_no matches the systems bus_no
Print seat availability else exit.
 After printing seat availability input passenger information
 Make payment if payment is successful confirm seat return to main
menu.

Page | 24
Bus Reservation System using C programming language

4.3 Flow chart for ticket cancel module using approach-3

Figure 4.3: flowchart for ticket cancelling module using approach-3

The flowchart for ticket cancelling module using approach-3 is as shown in figure

4.3. Stepwise description of flowchart is as follows.

 Take input of bus_no and seat_no.


 If bus_no and seat_no will matches to the system then continue further
else exit.
 If matches cancel ticket and refund.

4.4 Summary

This chapter presents different approaches for Bus Reservation system. The
flowchart for login module using approach-1 is presented in section 4.1.
Flowchart for booking module using approach-2 is explained in section 4.2. The
flowchart for ticket cancelling module using approach-3 is presented in section
4.3.

Page | 25
Bus Reservation System using C programming language

Chapter 5

IMPLEMENTATION
(In this chapter, pseudo codes for various approaches of bus reservation system are
discussed)

Page | 26
Bus Reservation System using C programming language

CHAPTER 5

IMPLEMENTATION

// Structures to store user and bus data

struct User {

char username[50];

char password[50];

float balance;

};

struct Bus {

char busName[50];

char source[50];

char destination[50];

int availableSeats;

float fare;

};

// Function to display bus details

void displayBusDetails(struct Bus busArray[], int n)


{

for (int i = 0; i < n; i++) {

printf("%d. Bus Name: %s\n", i+1,


busArray[i].busName);

Page | 27
Bus Reservation System using C programming language

printf(" Source: %s\n", busArray[i].source);

printf(" Destination: %s\n",


busArray[i].destination);

printf(" Available Seats: %d\n",


busArray[i].availableSeats);

printf(" Fare: %.2f\n", busArray[i].fare);

// Function to register a new user

void registerUser(struct User userArray[], int n) {

printf("Enter your username: ");

scanf("%s", userArray[n].username);

printf("Enter your password: ");

scanf("%s", userArray[n].password);

userArray[n].balance = 0;

printf("Registration successful. Your user ID is %d.\


n", n+1);

// Function to login

int login(struct User userArray[], int n) {

char username[50], password[50];

printf("Enter your username: ");

scanf("%s", username);

printf("Enter your password: ");

scanf("%s", password);

Page | 28
Bus Reservation System using C programming language

for (int i = 0; i < n; i++) {

if (strcmp(userArray[i].username, username) == 0
&& strcmp(userArray[i].password, password) == 0) {

return i;

return -1;

// Function to book a bus

void bookBus(struct User userArray[], int


userIndex, struct Bus busArray[], int busIndex) {

int numSeats;

printf("Enter the number of seats you want to book:


");

scanf("%d", &numSeats);

if (numSeats > busArray[busIndex].availableSeats)


{

printf("Sorry, there are not enough seats available


on this bus.\n");

} else if (userArray[userIndex].balance <


busArray[busIndex].fare * numSeats) {

printf("Sorry, you do not have enough balance to


book these seats.\n");

} else {

userArray[userIndex].balance -=
busArray[busIndex].fare * numSeats;

busArray[busIndex].availableSeats -= numSeats;

Page | 29
Bus Reservation System using C programming language

printf("Booking successful. Your new balance is


%.2f.\n", userArray[userIndex].balance);

// Function to add balance to a user's account

void addBalance(struct User userArray[], int


userIndex) {

float amount;

printf("Enter the amount you want to add to your


account: ");

scanf("%f", &amount);

userArray[userIndex].balance += amount;

printf("Your new balance is %.2f.\n",


userArray[userIndex].balance);

// Function to refund a user's booking

void refundBooking(struct User userArray[], int


userIndex, struct Bus busArray[], int busIndex) {

int numSeats;

printf("Enter the number of seats you want to


refund: ");

scanf("%d", &numSeats);

if (numSeats > bus)

Page | 30
Bus Reservation System using C programming language

Page | 31
Bus Reservation System using C programming language

Page | 32
Bus Reservation System using C programming language

Chapter 6

RESULTS AND DISCUSSION


(In this chapter, results of Bus reservation system are discussed)

Page | 33
Bus Reservation System using C programming language

CHAPTER 6

RESULTS AND DISCUSSION


This chapter explains how the Storage Files are handled and results of
various proposed approaches for Bus reservation. The results of various
approaches are compared and analyzed to discover their effectiveness for Bus
reservation .

6.2 Results and Analysis of the approaches for bus reservation


system.
6.2.1 Approach-1

Figure 6.2.1.1: output for approach-1

The Figure 6.2.1.1 is the result of login module it shows that login is successful.

Page | 34
Bus Reservation System using C programming language

Figure 6.2.1.2: output for approach-1

The Figure 6.2.1.1 is the result of login module it shows that login is unsuccessful.

6.2.2 Approach-2

This is the main menu.

Page | 35
Bus Reservation System using C programming language

Figure 6.2.1.3: output for approach-2

The Figure 6.2.1.3 is the result shows the main menu.

This is the list of buses

Page | 36
Bus Reservation System using C programming language

Figure 6.2.1.4: output for approach-2

The Figure 6.2.1.4is the result of login module it shows that login is successful.

Page | 37
Bus Reservation System using C programming language

Figure 6.2.1.5: output for approach-2

The Figure 6.2.1.5:is the result of login module it shows that login is successful.

Page | 38
Bus Reservation System using C programming language

Figure 6.2.1.6: output for approach-2

The Figure 6.2.1.6:is the result of login module it shows that login is successful.

6.2.3 Approach-3

This is result of cancelling ticket .seat no 1.

Page | 39
Bus Reservation System using C programming language

Figure 6.2.1.7: output for approach-3

The Figure 6.2.1.7:is the result of login module it shows that login is successful.

Page | 40
Bus Reservation System using C programming language

6.4 Summary

The results of approach-1 are analyzed in subsection 6.2.1.The results of


approach-2 and its alternatives are discussed in subsection 6.2.2. The results of
approach-3.

Page | 41
Bus Reservation System using C programming language

Chapter 7

CONCLUSION AND FUTURE WORK


(In this chapter, conclusion and future work that can be carried out on project are
discussed)

Page | 42
Bus Reservation System using C programming language

CHAPTER 7

CONCLUSION AND FUTURE WORK


7.1Conclusion

Developing Bus Rservation System has gained importance. Because this


can make easy to book bus tickets and prevent the disturbances happens in offline
booking in the digitized world. We have developed a simple Bus Reservation
System.
The Files are used to store the bus routes,timings and other information
about the buses. And there is other files which stores the data about customers
and his booking details. Its become easy to book tickets because of this project is
a user interactive.

7.2 Future work

We evaluated the developed approaches and their variations


individually. Combinations of different approaches can be considered. This is
based on model of combining classifiers. Different approaches can be
hierarchically used. Also, the approaches can be combined by merging the
intermediate results to get the final result.

Page | 43

You might also like