Skip to content

A simple Java console-based ticket reservation system that allows users to book tickets for Bus, Train, and Aeroplane. After booking, users can also view their detailed receipt. The project follows object-oriented programming principles and provides a modular and extendable structure.

Notifications You must be signed in to change notification settings

dawoodkhatri1/Ticket-Reservation-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎫 Java Ticket Reservation System

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.


πŸš€ Features

  • βœ… 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

🧱 Technologies Used

  • Java (JDK 8+)
  • Java Swing (for GUI)
  • JDBC (Java Database Connectivity)
  • MySQL
  • Maven/Gradle for dependency management

πŸ› οΈ How to Run

  1. Clone the repository:

    git clone https://github.com/dawoodkhatri1/Ticket-Reservation-System.git
  2. 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
  3. 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

πŸ“Œ Future Improvements

  • πŸ‘₯ Add user authentication and roles
  • πŸ’³ Payment gateway simulation
  • πŸ“Š Admin dashboard for viewing all bookings
  • 🌐 Multi-language support
  • πŸ–¨οΈ Print receipt feature

🀝 Contributing

Contributions are welcome! Fork the project, create a new branch, and submit a pull request.


About

A simple Java console-based ticket reservation system that allows users to book tickets for Bus, Train, and Aeroplane. After booking, users can also view their detailed receipt. The project follows object-oriented programming principles and provides a modular and extendable structure.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages