Professional Documents
Culture Documents
JPR Microprecjt
JPR Microprecjt
CERTIFICATE
This is certified that, the project report entitled “Bus Reservation System”
Submitted by Sujal Sanjay Sonawane {Enroll. No. 2215420044}, Yash Kailash puse
{Enroll. No. 2215420055} Has completed as per the requirement of Maharashtra
State Board of Technical Education in partial fulfilment of Diploma in Computer
Science and Engineering.
Place: Aurangabad
Data: / /
DECLARATION
We hereby declare that we have performed, completed and written the project
entitled “Bus Reservation System”. It has not previously submitted for the basis
of the award of any other degree or diploma or other similar title of his for any
other diploma/examining body or university to the best of knowledge and belief.
Place: Aurangabad
Date: / /
Sujal Sonawane
{Enroll. No. 2115420044}
Yash Kailash Puse
{Enroll. No. 2215420055}
INDEX
Sr. No. Content Page no.
1 About project
2 code
3 Output
ABOUT PROJECT
import java.util.Scanner;
while (true) {
System.out.println("1. Reserve a seat");
System.out.println("2. Cancel reservation");
System.out.println("3. View available seats");
System.out.println("4. Exit");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
switch (choice) {
case 1:
reserveSeat();
break;
case 2:
cancelReservation();
break;
case 3:
viewAvailableSeats();
break;
case 4:
System.out.println("Exiting the program.");
System.exit(0);
break;
default:
System.out.println("Invalid choice. Please try again.");
}
}
}
if (seats[seatNumber - 1]) {
System.out.println("Seat " + seatNumber + " is already reserved.");
} else {
seats[seatNumber - 1] = true;
System.out.println("Seat " + seatNumber + " reserved
successfully.");
}
}