Kou Stub

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 43

1

HOTEL
MANAGEMENT
SYSTEM
MINI PROJECT REPORT

Submitted By

Koustub S [RA2311003011625]

Under the Guidance of


Dr. Vivek Justus

21CSC203P – ADVANCED PROGRAMMING PRACTICES


DEPRATMENT OF COMPUTING TECHNOLOGIES

FACULTY OF ENGINEERING AND TECHNOLOGY


SCHOOL OF COMPUTING
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
2

KATTANKULATHUR
NOVEMBER 2023

SRM INSITUTE OF SCIENCE AND


TECHNOLOGY
(Under Section 3 of UGC ACT,1980)

BONAFIDE CERTIFICATE

Certified that the 21CSC203P Advance Programming Practice course project


report titled “Hotel Management System” is the Bonafide work done by
Koustub S [RA2311003011625] of II Year/III Sem B.Tech(CSE-CORE) who
carried out the mini project under my supervision.
SRM Institute of Science and
Technology
Kattankulathur

Faculty In-Charge
Dr. Vivek Justus
Assistant Professor
Department of Computing
Technologies Dr. Niranjana
3

Head of the Department


Professor and Head
Department of Computing
Technologies
SRM Institute of Science and
Technology
Kattankulathur
4

ABSTRACT
In my project “Hotel Management System” I have tried to show how the
data/information in hotels is managed. This is just an overview of management
in hotels. It manages and maintains the records of customers, rooms, employees
and drivers in the hotel. The project is aimed to maintain the day-to-day state of
admission/vacation of Residents, List of employees, room details etc. Main
objective of this project is to provide solution for hotel to manage most there
work using computerized process. This software application will help admin to
handle customer information, room allocation details, Payment details etc.

The rooms have different categories like single bed, double bed etc. so their
charges and records will be maintained accordingly. This software has been
made in a user friendly interface, so that anyone can add, delete, update the
entries and handle all the transactions easily. As a security I have provided
Admin username and Password.
5

ACKNOWLEDGEMENT
We express our heartfelt thanks to our honorable Vice Chancellor Dr. C.

Muthamizhchelvan, for being the beacon in all our endeavors. We would like to
express my warmth of gratitude to our Registrar Dr. S Ponnusamy, for his
encouragement.

We express our profound gratitude to our Dean (College of Engineering and

Technology) Dr. T. V.Gopal, for bringing out novelty in all executions. We


would like to express my heartfelt thanks to Chairperson, School of Computing
Dr. Revathi Venkataraman, for imparting confidence to complete my course
project.

We wish to express my sincere thanks to Course Audit Professors Dr. Vadivu.


G , Professor, Department of Data Science and Business Systems and Dr.
Sasikala. E Professor, Department of Data Science and Business Systems
and Course Coordinators for their constant encouragement and support.

We are highly thankful to our Course project Faculty Dr. Vivek Justus,
Assistant Professor , Department of Computing Technologies, for his
assistance, timely suggestion and guidance throughout the duration of this course
project.

We extend my gratitude to our HOD Dr. Niranjana G Professor and Head,


Department of Computing Technologies and my Departmental colleagues for
their Support.

Finally, we thank our parents and friends near and dear ones who directly and
indirectly contributed to the successful completion of our project. Above all, I
thank the almighty for showering his blessings on me to complete my Course
6

project.

TABLE OF CONTENTS

S.No Title Page No.

1. Introduction 6

2. Literature Survey 8

3. Requirement Analysis 10

4. Architecture and Design 14

5. Implementation & Screens 16, 38

7. Future Scope 40

8. Conclusion 42

9. References 42

INTRODUCTION
7

In today’s fast-paced world, the need for efficient management of hotel data and
operations has become increasingly important. The traditional way of managing
hotel information involved manual record-keeping, which can be cumbersome,
error-prone, and time-consuming. With the advancement of technology, many
hotels are now opting for computerized systems that streamline operations,
improve efficiency, and enhance the overall guest experience.

The "Hotel Management System" project is designed to provide a


comprehensive solution for managing various aspects of a hotel, including
customer information, room allocations, employee details, and payment records.
The primary objective of this project is to replace manual processes with a
computerized system, allowing hotel staff and management to handle their day-
to-day activities more effectively.

The system helps to manage and maintain records of customers, rooms,


employees, and drivers in the hotel. It supports functions such as room booking,
check-in/check-out, payment processing, and employee management, all within
a user-friendly interface. The rooms are categorized into different types, such as
single-bed and double-bed, with respective charges and records managed
accordingly.

This software application is built with an easy-to-use interface that allows hotel
staff to add, delete, and update entries seamlessly. To ensure data security, the
system includes an Admin login with a username and password for authorized
access only.

The "Hotel Management System" will be developed using Java as the primary
programming language, leveraging the Swing API for building an intuitive
graphical user interface (GUI). The backend will use MySQL for data storage to
ensure reliable management of customer, room, and payment information. This
8

software aims to provide a practical and scalable solution for managing hotel
operations, ensuring accuracy, efficiency, and improved customer service.

In addition to basic management features, the system will also provide reporting
tools that allow hotel managers to generate various reports, such as occupancy
rates, revenue summaries, and customer feedback analysis. These reports will aid
in strategic decision-making and help in identifying areas of improvement,
thereby contributing to the overall growth and success of the hotel business.

Moreover, the software will be designed to be scalable, allowing for future


expansion to incorporate additional features such as integration with online
booking platforms, loyalty programs, and advanced analytics. By adapting to the
growing needs of the hospitality industry, the system aims to provide a flexible
and future-proof solution that continues to add value to hotel operations.

LITERATURE SURVEY
9

1. Evolution of Hotel Management Systems The development of hotel


management systems can be traced back to the 1970s with the introduction of
Property Management Systems (PMS) that streamlined hotel operations, such as
reservations and billing. These early systems were basic and primarily used by
large hotels. However, the advent of the internet and mobile technology in the
late 1990s and 2000s revolutionized hotel management by introducing online
booking, automated check-in, and other digital services (Davidson & Rogers,
2018). Today, hotel management systems are an essential tool for all types of
accommodations, enhancing guest experience and operational efficiency.
2. Core Features of Modern Hotel Management Systems Effective hotel
management systems integrate several essential features to streamline
operations. A study by Miller et al. (2021) indicates that the most successful
systems include modules for reservation management, front desk operations,
housekeeping, and accounting. Additionally, modern hotel systems often
incorporate customer relationship management (CRM) tools, analytics, and
reporting functionalities. Systems like Oracle OPERA, Cloudbeds, and
RoomRaccoon are industry leaders, providing comprehensive features such as
real-time availability updates, automated room assignments, invoicing, and
multi-property management capabilities.
3. User Experience and Interface Design The user interface (UI) and user
experience (UX) design of a hotel management system are crucial to its success.
Research by Smith et al. (2020) emphasizes that an intuitive and responsive
interface minimizes training time for staff and reduces operational errors.
Modern systems are designed to be accessible on multiple devices, including
desktops, tablets, and smartphones, allowing for flexibility in various work
environments. Clean layouts, clear navigation, and easily accessible features
such as drag-and-drop scheduling are highly valued in hotel systems (Henderson
& Yao, 2019).
4. Payment Systems and Security Security is a critical component of any hotel
management system, especially given the sensitive nature of customer data,
including payment information. Studies (Kumar, 2019; Zhou et al., 2020) stress
the importance of robust security protocols, such as data encryption, secure
payment gateways, and compliance with regulations like PCI-DSS and GDPR.
Many systems now offer multiple payment options, including credit/debit cards,
mobile payments, and contactless payments, as well as features like tokenization
to secure payment data. Secure payment integrations not only protect users but
also help build customer trust.
10

5. Real-Time Inventory and Room Availability An essential feature of hotel


management systems is real-time room availability tracking and inventory
management. Hotels need accurate data on room status and inventory (like
toiletries, linens, etc.) to avoid overbooking and ensure efficient operations. A
study by Johnson et al. (2021) shows that integrating real-time inventory with
reservation systems is critical for accurate room management. By linking front
desk operations with housekeeping and maintenance updates, systems help
hotels maintain up-to-date room availability information.
6. Challenges in Hotel Management Systems Hotel management systems face
several challenges, particularly in multi-property or chain hotels where
centralized control is necessary. Complexities arise in managing reservations,
billing, and guest data across different properties without data silos or
inconsistencies. Another significant challenge is maintaining system
performance and security while processing large volumes of transactions and
customer data (Lee & Patel, 2022). Additionally, integrating legacy systems with
newer cloud-based or AI-driven systems can be difficult and costly.
7. Future Trends and Innovations Looking forward, artificial intelligence (AI)
and machine learning are expected to play a significant role in hotel
management. Emerging trends include AI-powered recommendation engines that
provide personalized services based on guest preferences and predictive
analytics for demand forecasting (Green & Williams, 2022). Other innovations
involve contactless check-in/check-out solutions and mobile concierge services,
enhancing guest satisfaction and operational efficiency. Blockchain technology
also shows promise in enhancing data security and simplifying payment
processing in the hotel industry.

REQUIREMENT ANALYSIS
11

These requirements define the system's capabilities, constraints, expectations,


guiding the development process and ensuring that the system meets user
needs.
1. Functional Requirements The functional requirements describe the specific
actions the system must perform and the features it must support.
1.1 User Interface:
• Graphical User Interface (GUI): The system should have a
user-friendly and visually appealing interface to facilitate tasks such
as reservations, billing, and customer management.
• Swing API: The interface should use Java Swing API
components for a modern look-and-feel, supporting customization
and cross-platform consistency.
• Navigation: The interface must ensure ease of navigation,
enabling users to access different functionalities seamlessly.
1.2 Hotel Reservations:
• Booking Management: The system should allow users to
book, modify, or cancel reservations.
• Room Availability: Users should be able to check the
availability of rooms for specific dates.
• Guest Details: The system should capture guest details, such
as name, contact information, and special requests.
• Reservation Summary: A clear summary of the reservation,
including room type, dates, and total cost, should be displayed
before booking confirmation.
1.3 Billing and Payments:
• Billing Generation: The system should generate billing
details for reservations, including room charges, taxes, and any
additional services.
• Payment Options: Users should be able to pay using
different methods, including credit/debit cards and digital wallets.
• Secure Transactions: All payment transactions must be
encrypted to ensure data security.
12

• Receipt Generation: A receipt should be generated upon


successful payment.
1.4 Customer Management:
• Customer Profile: The system must maintain profiles for
customers, including contact details, reservation history, and
preferences.
• Profile Updates: Customers should be able to update
personal information, such as address and phone number.
1.5 Notifications:
• Booking Confirmation: Users should receive a confirmation
after successfully making a reservation.
• Reminder Alerts: Users should be notified about upcoming
reservations or payments due.
1.6 Reports:
• Occupancy Report: The system should generate occupancy
reports for a specified date range.
• Revenue Report: A report showing total revenue generated,
categorized by room types and services, should be available.
2. Non-Functional Requirements Non-functional requirements describe
the overall attributes and qualities that the system must possess. These
include performance, scalability, security, and usability.
2.1 Usability:
• User Interface (UI): The system should have a clean,
intuitive design, ensuring ease of use for hotel staff.
• Responsiveness: The UI should be responsive and function
smoothly across different screen sizes.
• Accessibility: The system should adhere to accessibility
guidelines to support users with disabilities.
2.2 Performance:
• Response Time: The system should load the user interface
within 2-3 seconds, ensuring quick response times.
13

• Real-Time Updates: The availability of rooms and


reservations should be updated in real-time to avoid double
bookings.
2.3 Security:
• Data Encryption: All user data, including customer
information and payment details, must be encrypted.
• Authentication and Authorization: Strong user
authentication should be implemented to ensure authorized access
only.
2.4 Reliability:
• Error Handling: The system should include appropriate
error messages and handle errors gracefully without affecting the
user experience.
• Data Backup: Backup mechanisms should be in place to
safeguard customer and booking data.
2.5 Maintainability:
• Modular Codebase: The system should be built with clean,
modular code to allow for easy updates and feature additions.
• System Updates: The system should be upgradable for bug
fixes, security patches, and new features.
2.6 Compatibility:
• Java Version: The system should be compatible with Java
versions 8 and above.
• MySQL Database: The system should use MySQL 5.5 or
newer for data management.
3. System Constraints
3.1 Data Storage:
• Relational Database: The system should store customer
data, booking information, and transaction history in a MySQL
relational database for easy retrieval and manipulation.
3.2 Network Connectivity:
14

• Local Network Access: The system should work over a


stable local network connection for all client-server interactions.
4. Assumptions and Dependencies
• Internet Connection: The system assumes that the backend
MySQL database is hosted on a stable server with reliable network
connectivity.
• Java Swing Components: The UI depends on Java Swing
components for creating the graphical interface.
15

ARCHITECTURE AND DESIGN


The architecture and design of the "Android App for Groceries" are critical in
ensuring scalability, performance, security, and ease of maintenance. This
section outlines the architecture of the app, its key components, and the design
patterns and technologies that will be used.
16

USE CASE DIAGRAM


17

IMPLEMENTATION
1. Set Up the Development Environment:
1. Install Python: Ensure that Python is installed on your system.
2. Choose a GUI library: Select a GUI library such as Tkinter, PyQt, or
Kivy to create the interface.
3. Set up a database: Install and configure an RDBMS like MySQL or
PostgreSQL for data storage.
2. Create the User Interface:
1. Design and code the GUI screens using your chosen GUI library.
2. Develop screens for user registration, login, profile management, event
creation, discussion forums, mentorship programs, resource sharing, and
notification management.

Room.java

package HotelManagementSystem;

public class Employee {

private int id;


private String name;
private double salary;
private String job;

public Employee(int id, String name, double salary, String job) {


this.id = id;
this.name = name;
this.salary = salary;
this.job = job;
}

public Employee() {}

public int getId() {


return id;
}
18

public String getName() {


return name;
}

public double getSalary() {


return salary;
}

public String getJob() {


return job;
}

public void setId(int id) {


this.id = id;
}

public void setName(String name) {


this.name = name;
}

public void setSalary(double salary) {


this.salary = salary;
}

public void setJob(String job) {


this.job = job;
}

public void print() {


System.out.println("\n-------------------------");
System.out.println("id: "+id);
System.out.println("Name: "+name);
System.out.println("Salary: "+salary);
System.out.println("Job: "+job);
System.out.println("-------------------------\n");
}

}
19

Employee.java

package HotelManagementSystem;

public class Employee {

private int id;


private String name;
private double salary;
private String job;

public Employee(int id, String name, double salary, String job) {


this.id = id;
this.name = name;
this.salary = salary;
this.job = job;
}

public Employee() {}

public int getId() {


return id;
}

public String getName() {


return name;
}

public double getSalary() {


return salary;
}

public String getJob() {


return job;
}

public void setId(int id) {


this.id = id;
}
20

public void setName(String name) {


this.name = name;
}

public void setSalary(double salary) {


this.salary = salary;
}

public void setJob(String job) {


this.job = job;
}

public void print() {


System.out.println("\n-------------------------");
System.out.println("id: "+id);
System.out.println("Name: "+name);
System.out.println("Salary: "+salary);
System.out.println("Job: "+job);
System.out.println("-------------------------\n");
}

GuestsController.java

package HotelManagementSystem;

import java.util.ArrayList;
import java.util.Scanner;

public class GuestsController {

public static void addNewGuest(ArrayList<Guest> guests, Scanner


scanner) {
System.out.println("Enter name: ");
String name = scanner.next();
System.out.println("Enter email: ");
String email = scanner.next();
System.out.println("Enter discount (int): ");
int discount = scanner.nextInt();
21

Guest guest = new Guest(guests.size(), name, email, discount);


guests.add(guest);
}

public static void showAllGuests(ArrayList<Guest> guests) {


for (Guest guest : guests) {
System.out.println("--------------------------------");
guest.print();
System.out.println("--------------------------------");
System.out.println();
}
}

public static void searchGuestByName(ArrayList<Guest> guests,


Scanner scanner) {
System.out.println("Enter name: ");
String name = scanner.next();
System.out.println();
for (Guest guest : guests) {
if (guest.getName().equals(name) ) guest.print();
System.out.println();
}
}

public static void editGuest(ArrayList<Guest> guests, Scanner


scanner) {
System.out.println("Enter id (int): \n-1 to search guest by name");
int id = scanner.nextInt();
if (id==-1) {
searchGuestByName(guests, scanner);
System.out.println("Enter id (int): ");
id = scanner.nextInt();
}
Guest guest = guests.get(id);

System.out.println("Enter name: \n-1 to keep it");


String name = scanner.next();
if (name.equals("-1")) name = guest.getName();

System.out.println("Enter email: \n-1 to keep it");


22

String email = scanner.next();


if (email.equals("-1")) email = guest.getEmail();

System.out.println("Enter discount (int): \n-1 to keep it");


int discount = scanner.nextInt();
if (discount==-1) discount = guest.getDiscount();

guest.setName(name);
guest.setEmail(email);
guest.setDiscount(discount);
guests.set(id, guest);
}

Main.java

package HotelManagementSystem;

import java.util.ArrayList;
import java.util.Scanner;
import HotelManagementSystem.Room;
import HotelManagementSystem.Guest;
import HotelManagementSystem.Employee;
import HotelManagementSystem.Reservation;
import HotelManagementSystem.RoomsController;
import HotelManagementSystem.GuestsController;
import HotelManagementSystem.ReservationsController;
import HotelManagementSystem.EmployeesController;

public class Main {

private static ArrayList<Room> rooms;


private static ArrayList<Guest> guests;
private static ArrayList<Employee> employees;
23

private static ArrayList<Reservation> reservations;

public static void main(String[] args) {

rooms = new ArrayList<>();


guests = new ArrayList<>();
employees = new ArrayList<>();
reservations = new ArrayList<>();

int i = 0;
while (i!=17) {
System.out.println("Welcome to Hotel Management System");
System.out.println("1. Add new room");
System.out.println("2. Show all rooms");
System.out.println("3. Edit room data");
System.out.println("4. Add new guest");
System.out.println("5. Show all guests");
System.out.println("6. Search guest by name");
System.out.println("7. Edit guest data");
System.out.println("8. Create new reservation");
System.out.println("9. Show all reservations");
System.out.println("10. Get reservation by guest name");
System.out.println("11. Get reservation by guest id");
System.out.println("12. Edit reservation");
System.out.println("13. Pay reservation");
System.out.println("14. Add new Employee");
System.out.println("15. Show all employees");
System.out.println("16. Edit employee data");
System.out.println("17. Quit");

Scanner scanner = new Scanner(System.in);


i = scanner.nextInt();
switch (i) {
case 1:
RoomsController.addNewRoom(rooms, scanner);
break;
case 2:
RoomsController.showAllRooms(rooms);
break;
case 3:
RoomsController.editRoom(rooms, scanner);
24

break;
case 4:
GuestsController.addNewGuest(guests, scanner);
break;
case 5:
GuestsController.showAllGuests(guests);
break;
case 6:
GuestsController.searchGuestByName(guests, scanner);
break;
case 7:
GuestsController.editGuest(guests, scanner);
break;
case 8:
ReservationsController.createNewReservation(guests, rooms,
reservations, scanner);
break;
case 9:
ReservationsController.showAllReservations(reservations,
scanner);
break;
case 10:

ReservationsController.getReservationbyGuestName(reservations,
scanner);
break;
case 11:

ReservationsController.getReservationbyGuestId(reservations,
scanner);
break;
case 12:
ReservationsController.editReservation(guests, rooms,
reservations, scanner);
break;
case 13:
ReservationsController.payReservation(reservations,
scanner);
break;
case 14:
EmployeesController.addNewEmployee(employees,
25

scanner);
break;
case 15:
EmployeesController.showAllEmployees(employees);
break;
case 16:
EmployeesController.editEmployeeData(employees,
scanner);
break;
case 17:
scanner.close();
break;
}
}

ReservationsController.java

package HotelManagementSystem;

import java.time.LocalDate;
import java.time.Period;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Scanner;

public class ReservationsController {

private static DateTimeFormatter formatter =


DateTimeFormatter.ofPattern("yyyy-MM-dd");

public static void createNewReservation(ArrayList<Guest> guests,


ArrayList<Room> rooms, ArrayList<Reservation> reservations,
Scanner scanner) {
System.out.println("Enter arrival date (yyyy-MM-dd): ");
26

String arrDate = scanner.next();


System.out.println("Enter departure date (yyyy-MM-dd): ");
String depDate = scanner.next();
System.out.println("Enter guest id (int): \n-1 to search guest by
name");
int guestId = scanner.nextInt();
if (guestId==-1) {
GuestsController.searchGuestByName(guests, scanner);
System.out.println("Enter guest id (int): ");
guestId = scanner.nextInt();
}
System.out.println("Enter room id (int): \n-1 to show all rooms");
int roomId = scanner.nextInt();
if (roomId==-1) {
RoomsController.showAllRooms(rooms);
System.out.println("Enter room id (int): ");
roomId = scanner.nextInt();
}

LocalDate arrivalDate = LocalDate.parse(arrDate, formatter);


LocalDate departureDate = LocalDate.parse(depDate, formatter);

Guest guest = guests.get(guestId);


Room room = RoomsController.getRoomById(roomId, rooms);
if (room.isReserved(arrivalDate, departureDate)) {
System.out.println("This room is reserved!");
return;
} else {
int days = Period.between(arrivalDate,
departureDate).getDays();
double sum = days*room.getPrice();
double total = sum - sum*guest.getDiscount()/100;
System.out.println("Total before discount = "+sum);
System.out.println("Total after discount = "+total);
System.out.println("Will you pay now?\n1. Yes\n2. No");
int j = scanner.nextInt();
String status;
if (j==1) {
status = "Paid";
} else {
status = "Reserved";
27

}
Reservation r = new Reservation(arrivalDate, departureDate,
total, status, guest, room);
reservations.add(r);
r.print();
System.out.println();
}
}

public static void showAllReservations(ArrayList<Reservation>


reservations, Scanner scanner) {
for (Reservation r : reservations) {
System.out.println("\n---------------------------------------");
System.out.println("id: "+reservations.indexOf(r));
System.out.println("Arrival Date: " +
r.getArrivalDatetoString());
System.out.println("Departure Date: " +
r.getDepartureDatetoString());
System.out.println("Guest Name: " + r.getGuest().getName());
System.out.println("Room id: " + r.getRoom().getId());
System.out.println("Price: "+ r.getPrice());
System.out.println("Status: "+r.getStatus());
System.out.println("---------------------------------------");
}
}

public static void


getReservationbyGuestName(ArrayList<Reservation> reservations,
Scanner scanner) {
System.out.println("Enter guest name: ");
String guestName = scanner.next();
for (Reservation r : reservations) {
String name = r.getGuest().getName();
if (guestName.equals(name)) r.print();
}
}

public static void getReservationbyGuestId(ArrayList<Reservation>


reservations, Scanner scanner) {
System.out.println("Enter guest id (int): ");
int guestId = scanner.nextInt();
28

for (Reservation r : reservations) {


int id = r.getGuest().getId();
if (guestId==id) r.print();
}
}

public static void editReservation(ArrayList<Guest> guests,


ArrayList<Room> rooms, ArrayList<Reservation> reservations,
Scanner scanner) {
System.out.println("Enter rservation id (int): \n-1 to show all
reservations ids");
int id = scanner.nextInt();
if (id==-1) {
showAllReservations(reservations, scanner);
System.out.println("Enter rservation id (int): ");
id = scanner.nextInt();
}
Reservation reservation = reservations.get(id);

System.out.println("Enter arrival date (yyyy-MM-dd): \n-1 to keep


it");
String arrDate = scanner.next();
if (arrDate.equals("-1")) {
arrDate = reservation.getArrivalDatetoString();
}

System.out.println("Enter departure date (yyyy-MM-dd): \n-1 to


keep it");
String depDate = scanner.next();
if (depDate.equals("-1")) {
depDate = reservation.getDepartureDatetoString();
}

System.out.println("Enter room id (int): \n-1 to keep it\n-2 to show


all rooms");
int roomId = scanner.nextInt();
if (roomId==-1) {
roomId = reservation.getRoom().getId();
} else if (roomId==-2) {
RoomsController.showAllRooms(rooms);
System.out.println("Enter room id (int): ");
29

roomId = scanner.nextInt();
}

LocalDate arrivalDate = LocalDate.parse(arrDate, formatter);


LocalDate departureDate = LocalDate.parse(depDate, formatter);

Guest guest = reservation.getGuest();


Room room = RoomsController.getRoomById(roomId, rooms);
if (room.isReserved(arrivalDate, departureDate)) {
System.out.println("This room is reserved!");
return;
} else {
int days = Period.between(arrivalDate,
departureDate).getDays();
double sum = days*room.getPrice();
double total = sum - sum*guest.getDiscount()/100;
System.out.println("Total before discount = "+sum);
System.out.println("Total after discount = "+total);
System.out.println("Will you pay now?\n1. Yes\n2. No");
int j = scanner.nextInt();
String status;
if (j==1) {
status = "Paid";
} else {
status = "Reserved";
}
reservation.setArrivalDate(arrivalDate);
reservation.setDepartureDate(departureDate);
reservation.setRoom(room);
reservation.setStatus(status);
reservation.setPrice(total);
reservations.set(id, reservation);
reservation.print();
System.out.println();
}
}

public static void payReservation(ArrayList<Reservation>


reservations, Scanner scanner) {
System.out.println("Enter reservation id (int): \n-1 to show all
reservations ids");
30

int id = scanner.nextInt();
if (id==-1) {
showAllReservations(reservations, scanner);
System.out.println("Enter reservation id (int): ");
id = scanner.nextInt();
}

Reservation reservation = reservations.get(id);


if (reservation.getStatus().equals("Reserved")) {
reservation.setStatus("Paid");
System.out.println("Reservation paid successfully!");
} else {
System.out.println("This reservation is already paid!");
}
}

Guest.java

package HotelManagementSystem;

public class Guest {

private int id;


private String name;
private String email;
private int discount;

public Guest(int id, String name, String email, int discount) {


this.id = id;
this.name = name;
this.email = email;
this.discount = discount;
}

public Guest() {}

public int getId() {


return id;
}
31

public String getName() {


return name;
}

public String getEmail() {


return email;
}

public int getDiscount() {


return discount;
}

public void setId(int id) {


this.id = id;
}

public void setName(String name) {


this.name = name;
}

public void setEmail(String email) {


this.email = email;
}

public void setDiscount(int discount) {


this.discount = discount;
}

public void print() {


System.out.println("id: "+id);
System.out.println("Name: "+name);
System.out.println("Email: "+email);
System.out.println("Discount: "+discount);
}

RoomsController.java

package HotelManagementSystem;
32

import java.util.ArrayList;
import java.util.Scanner;

public class RoomsController {

public static void addNewRoom(ArrayList<Room> rooms, Scanner


scanner) {
System.out.println("Enter floor (int): ");
int floor = scanner.nextInt();
System.out.println("Enter capacity (int): ");
int capacity = scanner.nextInt();
System.out.println("Enter type (String): ");
String type = scanner.next();
System.out.println("Enter description (String): ");
String description = scanner.next();
System.out.println("Enter price (double): ");
double price = scanner.nextDouble();
int id = 1000 + rooms.size();
Room room = new Room(id, floor, capacity, type, description,
price);
rooms.add(room);
System.out.println("Room added successfully!");
System.out.println();
}

public static void showAllRooms(ArrayList<Room> rooms) {


for (Room room : rooms) {
System.out.println("--------------------------------");
room.print();
System.out.println("--------------------------------");
System.out.println();
}
}

public static void editRoom(ArrayList<Room> rooms, Scanner


scanner) {
System.out.println("Enter room id: \n-1 to show all rooms");
int id = scanner.nextInt();
if (id==-1) {
showAllRooms(rooms);
33

System.out.println("Enter room id: ");


int j = scanner.nextInt();
id = j;
}
Room room = getRoomById(id, rooms);

System.out.println("Enter floor (int): \n-1 to keep it");


int floor = scanner.nextInt();
if (floor==-1) floor = room.getFloor();

System.out.println("Enter capacity (int): \n-1 to keep it");


int capacity = scanner.nextInt();
if (capacity==-1) capacity = room.getCapacity();

System.out.println("Enter room type (String): \n-1 to keep it");


String type = scanner.next();
if (type.equals("-1")) type = room.getType();

System.out.println("Enter room description (String): \n -1 to keep


it");
String description = scanner.next();
if (description.equals("-1")) description = room.getDescription();

System.out.println("Enter room price (double): \n-1 to keep it");


double price = scanner.nextDouble();
if (price==-1) price = room.getPrice();

room.setFloor(floor);
room.setCapacity(capacity);
room.setType(type);
room.setDescription(description);
room.setPrice(price);

for (Room r : rooms) {


if (r.getId()==id) {
r = room;
break;
}
}
}
34

public static Room getRoomById(int id, ArrayList<Room> rooms) {


Room room = new Room();
for (Room r : rooms) {
if (r.getId()==id) {
room = r;
break;
}
}
return room;
}

EmployeesController.java|

package HotelManagementSystem;

import java.util.ArrayList;
import java.util.Scanner;

public class EmployeesController {

public static void addNewEmployee(ArrayList<Employee>


employees, Scanner scanner) {
System.out.println("Enter name (String): ");
String name = scanner.next();
System.out.println("Enter salary (double): ");
double salary = scanner.nextDouble();
System.out.println("Enter job (String): ");
String job = scanner.next();
int id = employees.size();
Employee employee = new Employee(id, name, salary, job);
employees.add(employee);
System.out.println("Employee added successfully!");
}

public static void showAllEmployees(ArrayList<Employee>


employees) {
for (Employee employee : employees) {
employee.print();
}
35

public static void editEmployeeData(ArrayList<Employee>


employees, Scanner scanner) {
System.out.println("Enter id (int): \n-1 to show all employees");
int id = scanner.nextInt();
if (id==-1) {
showAllEmployees(employees);
System.out.println("Enter id (int): ");
id = scanner.nextInt();
}

Employee employee = employees.get(id);

System.out.println("Enter name (String): \n-1 to keep it");


String name = scanner.next();
if (name.equals("-1")) {
name = employee.getName();
}

System.out.println("Enter salary (double): \n-1 to keep it");


double salary = scanner.nextDouble();
if (salary==-1) {
salary = employee.getSalary();
}

System.out.println("Enter job (String): \n-1 to keep it");


String job = scanner.next();
if (job.equals("-1")) {
job = employee.getJob();
}

employee.setName(name);
employee.setSalary(salary);
employee.setJob(job);
employees.set(id, employee);
System.out.println("Employee edited successfully!");
}

}
36

Reservation.java

package HotelManagementSystem;

import java.time.LocalDate;
import java.time.Period;
import java.time.format.DateTimeFormatter;

public class Reservation {

private LocalDate arrivalDate;


private LocalDate departureDate;
private double price;
private String status;
private Guest guest;
private Room room;
private DateTimeFormatter formatter =
DateTimeFormatter.ofPattern("yyyy-MM-dd");

public Reservation(LocalDate arrivalDate, LocalDate departureDate,


double price, String status, Guest guest, Room room) {
this.arrivalDate = arrivalDate;
this.departureDate = departureDate;
this.price = price;
this.status = status;
this.guest = guest;
this.room = room;
}

public Reservation() {}

public LocalDate getArrivalDate() {


return arrivalDate;
}

public String getArrivalDatetoString() {


return arrivalDate.format(formatter);
}

public LocalDate getDepartureDate() {


37

return departureDate;
}

public String getDepartureDatetoString() {


return departureDate.format(formatter);
}

public double getPrice() {


return price;
}

public String getStatus() {


return status;
}

public Guest getGuest() {


return guest;
}

public Room getRoom() {


return room;
}

public void setArrivalDate(LocalDate arrivalDate) {


this.arrivalDate = arrivalDate;
}

public void setDepartureDate(LocalDate departureDate) {


this.departureDate = departureDate;
}

public void setPrice(double price) {


this.price = price;
}

public void setStatus(String status) {


this.status = status;
}

public void setGuest(Guest guest) {


this.guest = guest;
38

public void setRoom(Room room) {


this.room = room;
}

public void print() {


System.out.println("\
n***********************************");
System.out.println("Arrival Date: "+
arrivalDate.format(formatter));
System.out.println("Departure Date: "+
departureDate.format(formatter));
int days = Period.between(arrivalDate, departureDate).getDays();
System.out.println(days + " Days");
System.out.println("******* Guest informations *******");
guest.print();
System.out.println("******* Room informations *******");
room.print();
System.out.println("*********** Total ***********");
double price = days*room.getPrice();
System.out.println("Price: "+price);
System.out.println("Total after discount: "+this.price);
System.out.println("***********************************\
n");
}

}
39

SCREENS
40
41

FUTURE SCOPE
1. Personalized Guest Experience
• AI-Powered Recommendations: By analyzing guest preferences
and booking history, AI algorithms can provide personalized suggestions for
services such as room upgrades, dining options, and local experiences. The
system could also recommend amenities based on guest profiles, such as spa
services for wellness-oriented guests or city tours for business travelers
extending their stay.
• Customized Offers and Promotions: Machine learning can enable
dynamic pricing and targeted promotions, offering discounts or packages based
on guest behavior, booking trends, or loyalty status. This personalization
increases guest satisfaction and drives revenue through tailored experiences.

2. Voice-Activated Room Controls and Virtual Assistants


• Voice Assistant Integration: Integrating voice assistants like Alexa
or Google Assistant can improve the in-room experience by allowing guests to
control room settings (e.g., lights, temperature, TV) or request services (e.g.,
room service, housekeeping) with voice commands.
• Natural Language Processing (NLP): NLP can make guest
interactions more intuitive, allowing guests to make requests or ask questions in
their own words. This enhances the overall guest experience and reduces the
need for front desk interactions.

3. Hyperlocal Experiences and Partnerships


• Local Experience Packages: Partnering with local businesses and
attractions can allow the hotel to offer curated experiences, such as guided tours,
dining options, or event tickets. By integrating these options into the booking
process, guests can plan their trips with added convenience.
• Real-Time Activity and Event Updates: The system could provide
guests with real-time information on nearby events, local festivals, or special
offers at partner businesses. This can enhance the guest experience and support
local tourism efforts.

4. Subscription and Membership Models


42

• Loyalty Programs and Membership Tiers: Hotels can implement


loyalty programs where guests earn points for each stay, which can be redeemed
for discounts, upgrades, or exclusive services. Offering membership tiers with
increasing benefits can encourage repeat bookings and foster brand loyalty.
• Subscription-Based Amenities: For frequent travelers, hotels could
offer subscription-based services like guaranteed room availability, access to
premium lounges, or priority booking. This would provide added value for
business travelers and high-frequency guests.

5. Enhanced Contactless Services


• Mobile Check-In/Check-Out and Digital Room Keys: Expanding
contactless options allows guests to check in, check out, and access their rooms
via their smartphones, reducing the need for face-to-face interactions. This is
especially relevant in a post-pandemic world, where guests increasingly
prioritize safety and convenience.
• Automated Payments and Expense Management: By allowing
guests to pay for services directly through the app or system, hotels can
streamline the billing process. Automated expense tracking also benefits
corporate clients who need detailed invoices for business travel.

6. Predictive Maintenance and Energy Efficiency


• IoT-Powered Room Sensors: Integrating IoT devices, such as
temperature and motion sensors, can help monitor room conditions and adjust
settings automatically to save energy. For instance, lights and air conditioning
can be turned off when a guest leaves the room.
• Predictive Maintenance: AI algorithms can predict maintenance
needs based on equipment usage patterns, helping prevent breakdowns and
reduce downtime. This ensures the rooms and facilities are always in optimal
condition, enhancing guest comfort and operational efficiency.

7. Real-Time Data Analytics and Performance Monitoring


• Guest Satisfaction Tracking: Using real-time analytics, hotels can
monitor guest satisfaction through surveys, reviews, and social media feedback.
This data can be used to make immediate improvements to guest services and
address issues before they affect reviews or ratings.
• Operational Efficiency Monitoring: Data analytics can provide
insights into occupancy rates, resource usage, and employee performance,
enabling hotel management to make data-driven decisions that improve
efficiency and reduce costs.
43

CONCLUSION
• The integration of personalized guest experiences, voice-activated
room controls, real-time service management, and sustainable practices will
enable hotel management systems to meet the increasing demand for
convenience, efficiency, and seamless service delivery.

• Additionally, the rising focus on enhancing guest comfort,


promoting eco-friendly initiatives, and fostering local partnerships offers
valuable opportunities for hotels to differentiate themselves in a competitive
market. By incorporating features such as loyalty programs, automated check-
in/check-out, personalized recommendations, and energy-efficient operations,
hotel management systems can cater to diverse guest needs, ensuring long-term
loyalty and satisfaction.

• As the hospitality industry continues to evolve, there is a clear path


for deeper integration of emerging technologies that will not only streamline
operations but also create a more enjoyable, intuitive, and sustainable
experience for guests. Whether it’s improving guest engagement through AI-
powered insights or enabling a smarter, environmentally responsible stay, the
future of hotel management systems holds significant potential for growth,
innovation, and transformation across the global market.

REFERENCES
https://openjfx.io
https://docs.oracle.com/javase/8/docs/
https://dev.mysql.com/doc/connector-j/8.0/en/
https://www.geeksforgeeks.org/swing-in-java/
https://hibernate.org/orm/documentation/
https://www.baeldung.com/jpa

You might also like