A Java-based console application for managing ticket bookings for trains. The system supports user registration, login, ticket booking, cancellations, schedule management, and admin operations.
- Register and login
- View and update profile
- Admin and Customer roles
- Search trains by station and date
- Book tickets by selecting coach and seat
- Cancel or modify bookings
- Choose payment method: Card, UPI, or NetBanking
- Automatically assign seat upon successful booking
- View station-wise timing
- Admin can add new trains, coaches, and schedules
- Java 17+
- Console-based UI (no GUI)
- Java Collections (Map, List)
- Object-Oriented Programming (OOP)
TicketReservationSystem/
│
├── src/
│ ├── App.java # Main class (entry point)
│ ├── User.java # User class with enum UserType
│ ├── Profile.java # Profile details and payment method enum
│ ├── Train.java # Train class with schedule & coaches
│ ├── Coach.java # Coach with seat availability logic
│ ├── Booking.java # Booking details and status
│
├── README.md # You're here!
├── .gitignore # Optional, to ignore compiled files
└── bin/ # Compiled .class files (can be ignored in Git)
git clone https://github.com/Adithya-KSM/Railway-reservation-system.git
cd Railway-reservation-systemUsing terminal:
javac src/*.java
java src.AppOr run from an IDE like VS Code or Eclipse.
Register a new user View profile and add address/payment method Search for available trains Book a seat View booking details Cancel the booking