A simple Java console-based ticket reservation system that allows users to book tickets for Bus, Train, and Aeroplane. After booking, users can view a receipt with full booking details. The system is built using Object-Oriented Programming (OOP) principles and is structured for easy maintenance and scalability.
- β
Book tickets for:
- π Bus
- π Train
βοΈ Aeroplane
- β View and print a detailed receipt after booking
- β
Uses OOP principles:
- Inheritance
- Polymorphism
- Encapsulation
- β Easy-to-understand codebase for beginners
- Java (JDK 8+)
- Java Swing (for GUI)
- JDBC (Java Database Connectivity)
- MySQL
- Maven/Gradle for dependency management
-
Clone the repository:
git clone https://github.com/dawoodkhatri1/Ticket-Reservation-System.git
-
Set up the database:
- Create a database (e.g.,
ticket_system) - Import the provided SQL file or manually create tables:
tickets,users(optional), etc.
- Configure DB credentials in
DatabaseConnection.java
- Create a database (e.g.,
-
Build and run the project:
- Using an IDE like IntelliJ IDEA, Eclipse, or NetBeans:
- Open project
- Configure database if needed
- Run
Main.java
- Or compile via terminal:
javac Main.java java Main
- Using an IDE like IntelliJ IDEA, Eclipse, or NetBeans:
- π₯ Add user authentication and roles
- π³ Payment gateway simulation
- π Admin dashboard for viewing all bookings
- π Multi-language support
- π¨οΈ Print receipt feature
Contributions are welcome! Fork the project, create a new branch, and submit a pull request.