A console-based Java application for managing bus reservations with an interactive seat selection interface.
Manzil Bus is designed to demonstrate core Object-Oriented Programming (OOP) and File Handling concepts in Java. The project tackles the common "blind booking" problem by giving passengers a clear, visual map of the bus layout — letting them choose specific seats (Window/Aisle) before confirming, much like modern booking platforms.
- Visual Seat Map: A dynamic grid showing the bus layout so passengers can instantly spot available seats.
- Booking Validation: Prevents duplicate reservations by checking seat availability in real time.
- Data Persistence: Bookings and bus records are automatically saved to
.datfiles using Java Serialization — no database needed. - Admin Dashboard: Allows administrators to view the entire bus fleet and a full history of all bookings.
Language: Java (JDK 17+)
Concepts Applied:
- Object-Oriented Programming (Encapsulation, Classes, Objects)
- Collections Framework (
ArrayList,List) - File I/O (
ObjectOutputStreamfor serialized storage) - Exception Handling
Tools: Git, VS Code
Follow the steps below to run the project locally.
1. Clone the repository
git clone https://github.com/adityaabhinab/Manzil-Bus-Reservation-System.git2. Compile the source files
Navigate to the project root (where src is located) and run:
javac src/*.java -d out3. Launch the application
java -cp out Main- Start the App — Run the
Mainclass to load the main menu. - Book a Ticket — Select Option 2 from the menu.
- Choose a Bus — Enter a Bus ID (e.g.,
B-101). - Select a Seat — The system displays a live seat map:
[ ]= Available[X]= Booked- Enter your preferred Row (1–10) and Column (A–D).
- Confirm Booking — Provide passenger details to receive a unique Ticket ID.
Manzil-Bus-System/
├── src/
│ ├── Main.java # Entry point and UI logic
│ ├── Bus.java # Bus data model (2D seat array)
│ ├── Passenger.java # Passenger details model
│ ├── Booking.java # Ticket transaction model
│ ├── BusService.java # Core business logic
│ └── DataManager.java # File I/O and serialization
├── data/ # Auto-generated .dat files (created on first run)
├── statement.md # Problem statement and project scope
└── README.md # Project documentation
Name: Aditya Abhinab Subject: Programming in Java
Built as part of the "Build Your Own Project" evaluation.