Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏨 Hotel Reservation System

A simple console-based Hotel Reservation System built using Java, JDBC, and MySQL. This project allows users to search rooms, book reservations, make payments, and cancel bookings.


πŸš€ Features

  • Search available rooms by category (Standard / Deluxe / Suite)
  • Book a room with customer details
  • Simulate payment process
  • Cancel reservation (only after payment)
  • Database connectivity using MySQL

πŸ› οΈ Technologies Used

  • Java (Core)
  • JDBC
  • MySQL
  • OOP Concepts

βš™οΈ Setup

  1. Clone the repository:

    git clone https://github.com/your-username/hotel-reservation-system.git
  2. Create database:

    CREATE DATABASE hotel_reservation;
  3. Create tables:

    CREATE TABLE rooms (
        room_id INT PRIMARY KEY AUTO_INCREMENT,
        room_number VARCHAR(10),
        category VARCHAR(20),
        price DOUBLE,
        is_available BOOLEAN
    );
    
    CREATE TABLE reservations (
        reservation_id INT PRIMARY KEY AUTO_INCREMENT,
        customer_name VARCHAR(100),
        room_id INT,
        check_in DATE,
        check_out DATE,
        payment_status VARCHAR(20)
    );

  1. Update DB credentials in DatabaseConnection.java

  2. Add MySQL Connector JAR

  3. Run Main.java


πŸ“‹ Menu

1. Search available rooms
2. Make Reservation
3. Simulate payment
4. Cancel Reservation
5. Exit

πŸ“Œ Future Improvements GUI using JavaFX / Swing User authentication system Online payment integration Booking history tracking Admin panel


πŸ“‚ Project Structure

hotel-reservation-system/
β”‚
β”œβ”€β”€ db/
β”‚   └── DatabaseConnection.java     # Handles database connection
β”‚
β”œβ”€β”€ model/
β”‚   └── Room.java                   # Room entity (room number, price)
β”‚
β”œβ”€β”€ service/
β”‚   β”œβ”€β”€ RoomService.java            # Handles room-related operations
β”‚   └── ReservationService.java     # Handles booking, payment, cancellation
β”‚
β”œβ”€β”€ Main.java                       # Entry point (User Interface)
β”‚
└── README.md                       # Project documentation

πŸ“Œ Notes

  • Rooms become unavailable after booking
  • Payment is required before cancellation
  • Canceling a reservation frees the room again

πŸ‘¨β€πŸ’» Author

Md Ashif Ansari

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages