You are on page 1of 28

VIDYAPRATISHAN’S POLYTECHNIC COLLEGE, INDAPUR-

413106
A MICRO-PROJECT REPORT ON

“Bus Reservation System”

SUBMITTED BY
Ms. Sinde Neha Ishwor Enrollment No: 2211100102
Ms. Shinde Siddhi Babasaheb Enrollment No: 2211100103
Ms. Torasakar Samiksha Rajendra Enrollment No: 2211100109
Ms. Mahadik Amruta Navnath Enrollment No: 23212580361

UNDER THE GUIDANCE OF

Mrs. Devkate M.S.


IN PARTIAL FULFILMENT OF

DIPLOMAIN COMPUTER ENGINEERING


Course: Java Programming Course Code: 22412

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


CERTIFICATE

This is to certify that the micro- project entitled

“Bus Reservation System”

SUBMITTED BY

Sr.no Name Enrollment No. Seat No.

47 SHINDE NEHA ISWOR 2211100102

48 SHINDE SIDDHI BABASAHEB 2211100103

54 TORASKAR SAMIKSHA RAJENDRA 2211100109

63 MAHADIK AMRUTA NVNATH 23212580361

Has been successfully completed as per there requirements of the Maharashtra


State Board of Technical Education, Mumbai in part full film of diploma in
Computer Engineering. For the academic year2023-2024

Mrs. Devkate M.S. Prof. Bhuse S.H. Dr. Deshpande S.R.


(GUIDE) (HOD) (PRINCIPAL)
ABSTRACT

A bus reservation system is a mobile or web software solution designed to provide customers with
easy -to-utilize user experience for booking and purchasing tickets online. It stores customer’s
personal data records, destination ,billing ,and other information. The main objective of the bus
reservation system is to manage the details of Bus, Destination, Billing, Passengers and view. It
manages all the information about Bus ,passengers.
A Bus Reservation System project in java will calculate the pay amount and total passenger number
and gives you the details about the ticket fare. Also, you can select choice 1) Destination, 2)
Passengers, 3) Billing, 4) View, 5) Exit, etc. In destination we will see the place where the passenger
will travel from source to destination. Passengers can reserve the seats and fill the information about
the passengers. The passengers pay the amount and they view all the process is done. In this project
will calculate the amount and total passenger number and gives you data l about the ticket fare
ACKNOWLEDGEMENT

After the successful implementation of our project, we overcome with a sense of


gratitude towards those people, without whose support, guidance and cooperation this
would never have been possible.
First and for most we would like to thanks our Guide Mrs. Devkate S.M. for her valuable
guidance which provided us with a perfect path on which we were able to successful
implement our ideas.

Submitted by

Ms. Shinde Neha Ishwor

Ms. Shinde Siddhi Babasaheb

Ms. Toraskar Samiksha

Rajendra Ms. Mahadik Amruta

Navnath
Group Details:

Roll Exam
Sr. No Name of group members Enrollment No
No Seat No

1. SHINDE NEHA ISWOR 47 2211100102

2. SHINDE SIDDHI BABASAHEB 48 2211100103

3. TORASKAR SAMIKSHA
54 2211100109
RAJENDRA
MAHAD
4. IK AMRUTA NAVNATH
63 23212580361

Name of Guide: Mrs. Devkate M.S.


ANNEXUER-IA
PART A
Micro-project Report
“Bus Reservation System”

1.0Brief Introduction:

Learning programming with java in the given book E Balagurusamy .using java we can develop
mobile application, android application and some part of web application. Programming with java
Ebalagurusamy Core java volume I-Fundamentals .A Bus Reservation System project in java will
calculate the pay amount and total passenger number and gives you the details about the ticket fare.
Also, you can select choice 1) Destination, 2) Passengers, 3) Billing, 4) View, 5) Exit, etc. In The
destination we will see the place where the passenger will travel from source to destination. The
Passenger can reserve the seats and fill the information about the passengers. The passengers pay
amount and they view all the process is done. And last it will say thank you!

2.0 Aim of Micro-Project:

To expand the concepts of object-oriented programming. The objective of this project is to provide
The a complete understanding of core java concepts. A Bus reservation System is a software solution
designed to provide a customers with a personalized easy-to-utilize user experience for booking and
purchasing tickets. It stores customers’ personal data records, scheduled destination and other point.
The main objective of the Bus The Reservation System is to manage the details of tickets, booking,
seats etc

1
3.0Action plan

Role sand
Sr. Planned Planned
Details of activity start date Finish date Responsible
No
assigned to
whom
Collect data from different
Neha Shinde
Sources(books/internet/etc.
1. )

Collect data from similar Siddhi Shinde


2. Systems

Analysis of the
3. collected data & to Samiksha Torasakar
generate use f
formation for

Prepare required
drawing sand detailed Amruta Mahadik
4. plan for execution of
the
work.

Present generated
information visually in the Neha Shinde
5. form of appropriate
coding

6. Use of Equipment Siddhi Shinde

Prepare the Micro-


7. Torasakar Samiksha
project report

All Member
8. Prepare presentation

2
4.0 Resources Required:

Sr.
Name of Resource Specification Qty/Units Remark
No.
Processor-Intel
1 Computer system All things: 1 -
RAM=1.00GB

-
Software Jdk-21 -
2

5.0 References:

Book Name Author

Programming with java E-Balagurusamy

Java Complete Reference Schildt Herbert

6.0 Web References:

1.https://docs.oracle.com/javase/8/docs/
2.http://nptel.ac.in/course/106105084/25

3
ANNEXUER-IIA
PART B
Micro project Report
“Bus Reservation System”

1.0 Brief Introduction:

Learning programming with java in the given book E Balagurusamy .using java we can develop
application, android application and some part of web application. Programming with java E are the
Balagurusamy Core java volume I-Fundamentals .A Bus Reservation System project in java will the
amount and total passenger number and gives you the details about the ticket fare. Also, you can select
choice 1) Destination, 2) Passengers, 3) Billing, 4) View, 5) Exit, etc. In destination we will see the
place where the passenger will travel from source to destination. Passengers can reserve the seats and
fithe information about the passengers. The passengers pay the amount and they view all the process
done. And last it will say thank you!

2.0 Aim of Micro project:

To expand the concepts of object-oriented programming. The objective of this project is to provide
complete understanding of core java concepts. A Bus reservation System is a software solution designed
to provide customers with a personalized easy-to-utilize user experience for booking and purchasing
tickets. It stores customers’ personal data records, scheduled destination and other point. The main
objective of the Bus Reservation System is to manage the details of tickets, booking, seats etc.

3.0 Course Outcomes Integrated:

1. Implement Exception Handling.


2. Develop program for handling I/O and file streams.
3. Develop programs using Object Oriented methodology in java

4
4.0 Actual Procedure Followed:
Learning programming with java in the given book E Balagurusamy .using java we can develop
mobile application, android application and some part of web application. Programming with java
Balagurusamy Core java volume I-Fundamentals A Bus Reservation System project in java will
calculate the pay The amount and total passenger number and gives you the details about the ticket
fare. Also, you can select choice 1) Destination, 2) Passengers, 3) Billing, 4) View, 5) Exit, etc. In
destination we will see the place where the passenger will travel from source to destination.
Passengers can reserve the seats and fill the information about the passengers. The passengers pay
the amount and they view all the process is the done. And last it will say thank you!

5
Code
package com.sys;

import java.util.Scanner;
import java.io.*;
public class Busreservation
{

public static void main(String args[]) throws IOException {


BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

String user,password,yn,search,again,choice;
int to=0,y=1,z=0,end=0,r=1;
int available[] = new int[6];
int ticketI[][] = new int [100][3];
String ticketS[][] = new String[100][3];
double ticketD[][] = new double [100][3];
double pay[] = new double[20];
double change[] = new double[20];

for(int i=1;i<4;)
{
System.out.print("Enter User name: ");
Scanner sc=new Scanner(System.in);
String name=sc.next();
//user = in.readLine();
System.out.print("Enter Password: ");
String pass=sc.next();
//password = in.readLine();

//"available[]" is the SEAT AVAILABLE//


//store 20 seats every destination [1-5]//
for(int o=1; o<=5; o++){
6
available[o]=20;
}

//if user and password are correct proceed to MAIN MENU//


if( (pass.length()<=6))
{

for(int x=1; x==1;){


//the MAIN MENU//
System.out.println("\n\n******");
System.out.println("* BUS RESERVATION AND TICKETING SYSTEM *");
System.out.println("******");
System.out.println("* [1] Destination *");
System.out.println("* [2] Passengers *");
System.out.println("* [3] Billing *");
System.out.println("* [4] View *");
System.out.println("* [5] Exit *");
System.out.println("*****");
System.out.println("*****\n");

for(x=1; x==1;){
System.out.print("ENTER CHOICE: ");
choice=in.readLine();

//if CHOICE is "1" display the DESTINATION//


if (choice.equals("1")){
//the DESTINATION DETAILS//
//display the "Destination", every destination "Fare", and the "Seat" available//
System.out.println("*****");
System.out.println("* DESTINATION | FARE | SEAT *");
System.out.println("*****");
System.out.println("* 1.)INDAPUR | Rs.600 | "+available[1]+" *");
System.out.println("* 2.)AKLUJ | Rs.170 | "+available[2]+" *");
7
System.out.println("* 3.)PUNE | Rs.150 | "+available[3]+" *");
System.out.println("* 4.)LONI | Rs.200 | "+available[4]+" *");
System.out.println("* 5.)TEMBURNI | Rs.250 | "+available[5]+" *");
System.out.println("*****");
System.out.println("*****\n");
x=0;

//if CHOICE is "2" proceed to Ticket Booking//


else if (choice.equals("2")){
int print=1;
//display first the Destination Details//
System.out.println("*****");
System.out.println("* DESTINATION | FARE | SEAT *");
System.out.println("*****");
System.out.println("* 1.)INDAPUR | Rs.600 | "+available[1]+" *");
System.out.println("* 2.)AKLUJ | Rs.170 | "+available[2]+" *");
System.out.println("* 3.)PUNE | Rs.150 | "+available[3]+" *");
System.out.println("* 4.)LONI | Rs.200 | "+available[4]+" *");
System.out.println("* 5.)TEMBURNI | Rs.250 | "+available[5]+" *");
System.out.println("*****");
System.out.println("*****\n");
if((available[1]==0)&&(available[2]==0)&&(available[3]==0)&&(available[4]==0)&&(av
ailable[5]==0)){
System.out.println("Sorry, We don't have available seats for all Destination!");
x=0;
}
//inputing of Passenger's Name//
else{
for(x=1; x==1;){
System.out.print("\nENTER PASSENGER'S NAME: ");
ticketS[z][0] = in.readLine();
x=0;
8
//if Passenger's Name already used, display error and go back to Inputing//
for(int l=0; l<z; l++){
if(ticketS[l][0].equalsIgnoreCase(ticketS[z][0]))
{
System.out.println("Sorry, Passenger's name have already used!");
x=1;

}
} //inputing of Destination//
//integers Only [1-5]//
for(x=1; x==1;){
System.out.print("ENTER DESTINATION: ");
to = Integer.parseInt(in.readLine());

//if Inputed integers are "<1" or ">5", display error and go back to Inputing//
if(to<1 || to>5){
System.out.println("Invalid Input!");
x=1;
}
//if available seat is eqaul to "Zero", display error and go back to Inputing//
for(int d=1; d<=5; d++){
if(to==d){
if(available[to]==0){
System.out.println("Sorry, We don't have available seat!");
x=1;
}
x=0;
}
}
} //convert the integer to string//
String dest[] = { " ", "INDAPUR", "AKLUJ", "PUNE ", "LONI", "TEMBURNI"};
9
double fare[] = { 0,600,170,150,200,250};
//converted integer to string, transfer to storage array//
ticketS[z][1] = dest[to];
ticketD[z][0] = fare[to];
//inputing for Number of Passenger's//
for(x=1; x==1;){
System.out.print("HOW MANY PASSENGERS ARE YOU?: ");
ticketI[z][0] = Integer.parseInt(in.readLine());

//subtract the available seat by the the number inputed//


for(int p=1; p<=5; p++){
if(to==p){
print=1;
available[to] = available[to]-ticketI[z][0];

//if the subtracted available seat is "<0", display error//


//add the inputed number to the subtracted seat, to back the original seat//
//display the available seat and back to the inputing//
if(available[to]<0)
{
System.out.print("Sorry, We don't have seat available for " +ticketI[z][0] +" person\n");
available[to] = available[to]+ticket[z][0];
System.out.print("We only have " +available[to] +" seat available\n");
x=1;
print=0;
}
else{
x=0;
}
}
}
}

//inputing for Number of Discounted Passenger's//


10
for(x=1;x==1;){
System.out.print("HOW MANY PASSENGERS HAVE DISCOUNT?: ");

ticketI[z][1] = Integer.parseInt(in.readLine());

if(ticketI[z][1]>ticketI[z][0]){

System.out.println("Invalid Input!");
System.out.println("No. of Passengers are only " +ticketI[z][0] +"!");

x=1;
}

else
{
break;
}
}
//print out of passengers details....
if(print==1){
System.out.println("\n*******");
System.out.println("* PASSENGER'S DETAILS *");
System.out.println("*****");
System.out.println("PASSENGER'S NAME: " + ticketS[z][0]);
System.out.println("PASSENGER'S DESTINATION : " + ticketS[z][1]);
System.out.println("FARE PRICE: Rs " + ticketD[z][0]);
System.out.println("NO. OF PASSENGERS: " + ticketI[z][0]);
System.out.println("NO. OF PASSENGERS WITH DISCOUNT: " + ticketI[z][1]);
System.out.println("*****");
System.out.println("*****\n");
ticketS[z][2]="0";
double discount=(ticketD[z][0]-(ticketD[z][0]*0.2))*ticketI[z][1];
ticketD[z][2]= ((ticketI[z][0]-ticketI[z][1])*ticketD[z][0])+discount;
11
x=0;
}
z++;
}
}
else if (choice.equals("3"))
{
for(x=1; x==1;){
System.out.print("ENTER PASSENGER'S NAME: ");
search = in.readLine();
int s=1;
for(int b=0;b<z;b++){

if(search.equalsIgnoreCase(ticketS[b][0])){
System.out.println("*****");
System.out.println("* PASSENGER'S DETAILS *");
System.out.println("*****");
System.out.println("PASSENGER'S NAME: " + ticketS[b][0]);
System.out.println("PASSENGER'S DESTINATION : " + ticketS[b][1]);
System.out.println("FARE PRICE: Rs." + ticketD[b][0]);
System.out.println("NO. OF PASSENGERS: " + ticketI[b][0]);
System.out.println("NO. OF PASSENGERS WITH DISCOUNT: " + ticketI[b][1]);
System.out.println("*****");
System.out.println("*****");
s=0;
x=0;
if(ticketS[b][2].equals("x")){
System.out.println("Passenger's Already Paid!");
x=0;

else
12
{
ticketS[b][2]="x";
for(x=1; x==1;){
System.out.println("\nPASSENGER'S TOTAL FARE: Rs. "+ticketD[b][2]);
System.out.print("ENTER AMOUNT TO PAY: ");
pay[b] = Double.parseDouble(in.readLine());
change[b]=pay[b]-ticketD[b][2];
if(change[b]<0){
System.out.println("Invalid Input!");
x=1;
}
else{

System.out.println("CHANGE: Rs. "+change[b]);


System.out.println("");
x=0;
}
}
}
}
}
if (s==1){
System.out.println("\nPASSENGER'S NAME NOT FOUND!\n");
for(int q=1; q==1;)
{

System.out.print("Do you wish to continue with this transaction? [Y/N]: ");


again=in.readLine();
if(again.equalsIgnoreCase("y")){
q=0;
}
else if (again.equalsIgnoreCase("n"))
{
13
q=0;
x=0;
}

else
{
System.out.println("\nInvalid input!\n");
}
}
}
}
}
else if (choice.equals("4")){
for(int sx=1; sx<=3;){
System.out.print("SEARCH PASSENGER'S NAME: ");
search = in.readLine();

int s=1;
for(x=0; x<=z; x++){
if(search.equalsIgnoreCase(ticketS[x][0])){
System.out.println("*****");
System.out.println("* PASSENGER'S DETAILS *");
System.out.println("*****");
System.out.println("PASSENGER'S NAME: " + ticketS[x][0]);
System.out.println("PASSENGER'S DESTINATION : " + ticketS[x][1]);
System.out.println("FARE PRICE: Rs." + ticketD[x][0]);
System.out.println("NO. OF PASSENGERS: " + ticketI[x][0]);
System.out.println("NO. OF PASSENGERS WITH DISCOUNT: " + ticketI[x][1]);
System.out.println("TOTAL FARE PRICE: Rs." + ticketD[x][2]);
if(ticketS[x][2].equals("x")){
System.out.println("PAY: Rs. " +pay[x]);
System.out.println("CHANGE: Rs. " +change[x]);
System.out.println("STATUS: PAID");
}
14
else{
System.out.println("STATUS: NOT PAID");
}
System.out.println("*****");
System.out.println("*****");
s=0;
sx=4;
}
}

if (s==1){
System.out.println("Passenger's Name not found!");
sx++;
}

}
}

else if(choice.equals("5")){
end=1;
x=0;
System.out.println("Thank You!");
}

else{
System.out.println("Invalid Input!");
x=1;
}
}

for(y=1; y==1;){
if(end==1){
15
break;
}
System.out.print("Do you want another transaction? [Y/N]: ");
yn = in.readLine();

if (yn.equalsIgnoreCase("y")){

x=1;
y=0;
}
else if (yn.equalsIgnoreCase("n")){
System.out.println("\nThank You!!!");
break;
}
else{
System.out.println("Invalid Input!!!");
y=1;
}
}
}
i=4;
}

else{
System.out.println("\nInvalid user or password!\n");
i++;
}

}
}

16
Output:

17
18
19
Sr. No Details of activity Planned Planned Role sand
commencement Finish date Responsible
date assigned to whom

Collect data from


1. different Sources Neha Shinde
(books/internet/etc.)

2. Collect data from


similar Systems Siddhi Shinde

Analysis of the
3. collected data & to Samiksha Toraskar
generate use ful in
formation fromit
Prepare required
4. drawing sand
detailed plan for Amruta Mahadik
execution of the
work.
Present generated
5. information visually in
the form of Neha Shinde
appropriate coding

6. Use of Equipment Siddhi Shinde

7. Prepare the Micro-


project report Toraskar Samiksha

8. Prepare presentation All Member

6.0 Actual Resources Used

Sr. Name of Resource Specification Qty/Units Remark


No.
1 Computer system Ram –64 Gb All things 1 -
2 Software Jdk-21 1 no. -

20
7.0 Outputs of the micro projects:
The given Java programming manually allows a user to Bus Reservation System details .g, name
, Phone number ,total information etc.
8.0 Skills Developed /learning out of this Micro-Project

1. To under about graphics function.


2. To understand about algorithm.
3. To understand pixel of computer screen
4. Communication skill
9.0 Bibliography:

Web references:

https://docs.oracle.com/javase/8/doc
http://nptel.ac.in/course/106105084/25

Books:
1. Java programming
2. java complete Reference
3. Programming with java

21
ANEEXURE II
Evaluation Sheet for the Micro Project
Academic Year: 2023-24 Name of the Faculty: Mrs. Devkate M.S.
Course: Java Programming Semester:4I
Course code: : 22412

Title of the project: Bus Reservation System


COs addressed by Micro Project
1. Develop java program using Buffered Reader.
2. Develop java program using Exception handling.
3. Develop java program using Exception handling.
Major learning outcomes achieved by students by doing the project
(a) Practical outcome:
1. Basic knowledge
2. Discipline knowledge
(b)Unit outcomes in Cognitive domain:
1. Demonstrate working as a leader/a team member
2. Handling the instrument carefully.

(c)Outcomes in Affective domain:


Use java concepts of to solve engineering problems.
Comments/suggestions about team work /leadership/inter-personal communication (if any)
…………………………………………………………………………………………………………..............

Marks out of 6 Marks out of 4


Total
Roll for performance for performance
Student Name out
No. in group activity in oral/
of 10
(D5 Col.8) presentation (D5
Col.9)
47 SHINDE NEHA ISHWOR
SHINDE
48
SIDDHI
BABASAHEB
TORASKAR
54
SAMIKSHA
RAJENDARA
AMRUTA
63
NAVNATH
22
MAHADIK

(Signature of Faculty)

23

You might also like