Java
Java
Java
413106
A MICRO-PROJECT REPORT ON
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
SUBMITTED BY
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
Submitted by
Navnath
Group Details:
Roll Exam
Sr. No Name of group members Enrollment No
No Seat No
3. TORASKAR SAMIKSHA
54 2211100109
RAJENDRA
MAHAD
4. IK AMRUTA NAVNATH
63 23212580361
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!
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. )
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
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:
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”
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!
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.
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
{
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();
for(x=1; x==1;){
System.out.print("ENTER CHOICE: ");
choice=in.readLine();
}
} //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());
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{
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
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
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
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
(Signature of Faculty)
23