https://github.com/anshika010/hotel-reservation-system
The Hotel Reservation System is a console-based application developed in Java that allows users to manage room bookings efficiently. With functionality to reserve, view, update, and delete reservations, it streamlines the hotel management process.
https://github.com/anshika010/hotel-reservation-system
cli-tool dotenv-java java jdbc jdk18 mysql mysql-database
Last synced: about 1 month ago
JSON representation
The Hotel Reservation System is a console-based application developed in Java that allows users to manage room bookings efficiently. With functionality to reserve, view, update, and delete reservations, it streamlines the hotel management process.
- Host: GitHub
- URL: https://github.com/anshika010/hotel-reservation-system
- Owner: ANSHIKA010
- Created: 2024-10-13T11:31:26.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T13:06:16.000Z (6 months ago)
- Last Synced: 2025-02-12T13:56:24.909Z (3 months ago)
- Topics: cli-tool, dotenv-java, java, jdbc, jdk18, mysql, mysql-database
- Language: Java
- Homepage:
- Size: 3.68 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hotel Reservation System
A Hotel Reservation System designed in Java to streamline the process of room reservations in a hotel.
The system allows users to reserve rooms, view current reservations, update bookings, and delete reservations through a console-based interface.
The project integrates a MySQL database for storing and managing reservation data, utilizing JDBC for database connectivity.## Features
- **Reserve a Room:** Users can book a room by providing guest details, room number, and contact information.
- **View Reservations:** Display all existing reservations with details like reservation ID, guest name, room number, and reservation date.
- **Get Room Number:** Retrieve the room number associated with a specific reservation by providing the reservation ID and guest name.
- **Update Reservation:** Modify existing reservation details, such as guest name, room number, and contact information.
- **Delete Reservation:** Remove a reservation from the system by providing the reservation ID.
- **Exit:** Gracefully exit the system.## Technologies Used
- **Java:** Core programming language for building the system.
- **JDK:**: Java Development Kit (JDK 18 or later) to compile and run the program
- **JDBC:** Java Database Connectivity for interacting with the MySQL database.
- **MySQL:** Database for storing reservation details.
- **IntelliJ IDEA:** Integrated Development Environment (IDE) for coding and debugging.
- **Dotenv:** Java Dependency for managing environment variables like database credentials.
### -- High Level Design --
### -- Sequence Diagram --
## How to Set Up
### 1. Clone the repository:
```bash
git clone https://github.com/ANSHIKA010/hotel_reservation_system.git
```### 2. Database Setup:
- Ensure that MySQL is installed and running on your machine.
- Create a database and the necessary tables for storing reservations using the mysql [dump file](./database/hotel_db_reservation.sql) present in database folder.### 3. Configure Environment Variables:
- Use the .env.example file to configure the database connection details.
### 4. Run the Application:
- Open the project in IntelliJ IDEA or any Java IDE.
- Use JDK(18 or later) to compile and run the program.
- Ensure the required MySQL JDBC driver is added to the project dependencies.
- Run the Main class to start the system.## How to Use
Once the system starts, a menu will be displayed with options:```markdown
HOTEL MANAGEMENT SYSTEM
1. Reserve a room
2. View Reservations
3. Get Room Number
4. Update Reservation
5. Delete Reservation
0. Exit
Select the desired option by entering the corresponding number and follow the prompts.
```### Example Operations
#### 1. Reserving a Room
- Enter 1
- Enter guest details (name room_number contact_number).
The system will confirm if the reservation is successful.#### 2. Viewing Reservations
- Enter 2
Displays a list of all active reservations with their details in a table format.#### 3. Get Room Details
- Enter 3
- Enter room_numberGet the guest details of the entered room number.
#### 4. Updating Reservation
- Enter 4
- Enter reservation details (ReservationId guest_name room_number contact_number)
Modify the guest name, room number, or contact number for an existing reservation.### 5. Deleting a Reservation
- Enter 5
- Enter reservation_id
Permanently delete a reservation by providing the reservation ID.### 6. Exiting the system
- Enter 0
To exit the system.### -- User Flow --
## Project Structure
```bash
hotel_reservation_system/
│
| .env # Environment file for sensitive information.
| .env.example # Environment file example.
| .gitIgnore
| hotel_reservation_system.iml
|
+---database
| hotel_db_reservation.sql # MySQL database dump file to initialize the DB.
|
+---lib # Contains the libraries used for the project.
| dotenv-java-3.0.2.jar
| mysql-connector-java-8.0.28.jar
| protobuf-java-3.11.4.jar
|
+---out
| \---production
| \---hotel_reservation_system
| Main.class
|
\---src
Main.java # Entry point of the application
```## Future Improvements
- Add a graphical user interface (GUI) for a more user-friendly experience.
- Implement user authentication for better security.
- Allow dynamic pricing and availability checks for rooms.