Hotel Management System
The Hotel Management System is a Java-based application that streamlines hotel operations including guest management, room allocation, and booking handling. Designed with a clean, elegant user interface, it leverages Java Swing for a modern look and MySQL for reliable data storage with secure JDBC connectivity.
- Manage guests: add, update, delete, and list guest information.
- Manage rooms: add, update, delete, and list room details including availability.
- Manage bookings: create and delete room bookings with validation.
- Responsive and intuitive GUI following modern design principles.
- Robust error handling and data validation to prevent invalid operations.
- Modular architecture separating models, DAO layers, and UI components.
- Java (JDK 8+)
- Swing GUI toolkit
- MySQL database
- JDBC for database communication
- Logging using Java util logger
-
Database Setup:
-
Install MySQL and create a database named 'hms'.
-
Use the included SQL schema file or execute:
CREATE TABLE guests ( guest_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, contact_info VARCHAR(100) NOT NULL );
CREATE TABLE rooms ( room_id INT AUTO_INCREMENT PRIMARY KEY, room_type VARCHAR(50) NOT NULL, price DECIMAL(10, 2) NOT NULL, status ENUM('available', 'booked') DEFAULT 'available' );
CREATE TABLE bookings ( booking_id INT AUTO_INCREMENT PRIMARY KEY, guest_id INT NOT NULL, room_id INT NOT NULL, check_in_date DATE NOT NULL, check_out_date DATE NOT NULL, FOREIGN KEY (guest_id) REFERENCES guests(guest_id), FOREIGN KEY (room_id) REFERENCES rooms(room_id) );
-
-
Configuration:
- Create a 'config.properties' file inside 'src/main/resources/' with: db.url=jdbc:mysql://localhost:3306/hms db.username=your_mysql_username db.password=your_mysql_password
- Add 'config.properties' to '.gitignore' to avoid committing sensitive info.
-
Build & Run:
- Use your IDE (IntelliJ IDEA, Eclipse, etc.) to compile and run the 'HotelManagementSystemGUI' class.
- Alternatively, compile using javac and run via the command line ensuring all dependencies (MySQL connector JAR) are included in the classpath.
- Launch the application and use tabs to manage guests, rooms, and bookings.
- Add new records, update existing data, or delete entries using the provided forms.
- The system validates inputs and provides feedback on errors.
- Light background (#ffffff) with generous whitespace for clarity.
- Bold, elegant typography for titles and labels.
- Rounded cards and subtle shadows for content sections.
- Intuitive layout with responsive tables and well-aligned forms.
- Smooth hover and focus effects to enhance user experience.
- Comprehensive try-catch blocks log exceptions and notify users with clear messages.
- Input validation prevents invalid data from entering the system at both GUI and DAO layers.
- Implement reporting and analytics functionalities.
- Add user authentication and role-based access controls.
- Develop a web or mobile front-end client.
- Enable notifications and automated reminders for bookings.
For questions, support, or contributions, please contact- krishsing7612@gmail.com
This project is licensed under the MIT License - see LICENSE file for details.