Abstract: This paper contains steps to create a complete hotel system for the Java project, we will see how to create a hotel reservation management system in the Java programming language with the MySQL database. We will see the project creation step and will display the project UML. tools:
- netbeans ide 8.2.
- java programming language.
- xampp server.
- mysql database.
- phpmyadmin.
Introduction:
Today, software development has become a new era other than features of work in many areas, and software has become indispensable in many institutions.
It plays a very large role in facilitating transactions and it has a fundamental role in reducing human interference and some organizations whose entire system depends on software. Today we will talk about the use of software development in creating a complete hotel system.
Many institutions have become mainly dependent on a software system that reduces human intervention and reduces paper. Because the software system is fast, organized, and easy to use. We will do a project for employees to manage the hotel, such as reserving rooms for visitors and other services. Reservation of rooms. We will use Java language. This system will work on desktop systems The Database Schema: the database will contains 4 tables:
1 - table users: to store the users usernames and passwords and allow them to login.
2 - table resident: to store and manage the hotel clients data.
3 - table room's type: to store the hotel rooms categories ( single, double, family, suite ).
4 - table rooms: to store and manage the hotel rooms data.
5- table reservations : to store and manage the hotel rooms reservations data. The Hotel System:
The system consists of 8 user interface to control each window has a role either in adding or displaying data from databases we will talk about each interface in detail.
1-Loginform 2-All_Rooms_Types_Form 3-MainForm 4-ManageResidentsForm 5-ManageResirvationsForm 6-ManageRoomsForm 7-check-out 8-check-in
Login Form: the login form will allow the Users to login into the application Main Form. the user need to enter his username and password before clicking the login button. UML
if the user enter wrong username or password or let any one of this two fields empty an error message will show up telling him what's the problem.
and if everything is ok, when you click on the login button the main hotel system form will show up and the login form will close itself.
Main Form:
UML
and he can select where he want to go.
Manage Residents Form:
when you select "Clients" form the main form menu, the Manage Residents Form will show up
UML:
-
when this form load all clients will be displayed into a jtable.
-
to add a new client enter his data and click on "Add New Client" button.
-
to edit a client you need to select him first from the jtable and enter the his newdata. - when you want to delete a product just select the product you want to remove and click on the "Remove" button.
-
when you Edit or Remove a CLIENT click on the "Refresh" button to see the new results in the jtable.
Manage Rooms Form:
UML:
here the user can add a new room to the hotel system. when you add a new room you need to select the type of room (single, double, family, suite). and like the client form you can view all rooms in a datagridview and add, edit, remove the selecte one + a combobox populated with all room's categories.
here the user can add a new room to the hotel system. when you add a new room you need to select the type of room (single, double, family, suite).
and like the client form you can view all rooms in a datagridview and add, edit, remove the selecte one + a combobx populated with all room's categories.
i you click on the show types button this form will show up with all the room's types available in this hotel managemnt system.
Note: there is no form to mange room's types, if you want to add, edit, delete a category you can do that directly from the database.
ManageResirvationsForm: UML:
This form allow the user to manage the clients room reservations. to create a reservation you need: 1) enter the reservation id, 2) select the client who will reserve, 3) you need to select the room where the client will stay. when you add a new reservation the system will check:
- if the user enter all required informations.
- if the user enter a date in that is equal or come after the current day date.
- if the user enter a date out that is equal or come after the date in.
Client-form: UML:
Log in as a user. The user name and password are written and you click on the login button as a customer
Then you will be taken to client-form
After logging in, the page displays all customer information
There is in this interface 2 buttons, the first is responsible for reserving rooms for the customer and the second is to cancel the rooms reservation. If we press the button to reserve rooms, it will take us to the room reservation interface. check-in: UML:
In this interface the customer makes a reservation
After filling in the data, the program returns to the main page to display the data, and the program adjusts the databases in the table of rooms, it is reserved and the room number is written in the customer information in the customer table
Cancel reservation button scans the room and cancels the reservation of the customer
Now all the operating windows of the program have been explained All_Rooms_Types_Form class:
The conclusion:
We learned how to create desktop software in Java and created a complete system project for a hotel with databases
Refrences: 1-https://netbeans.org/downloads/6.1/index.html 2-https://www.apachefriends.org/index.html 3-https://guigarage.com/javafx-book/ 4-https://stackoverflow.com/questions/22433952/what-are-javafx-fxml-and-scenebuilder