You are on page 1of 42

19CSE204 - OBJECT ORIENTED PROGRAMMING

HOTEL MANANGEMENT SYSTEM

BY
ABIJITH PRASANTHAN (AM.EN. U4CSE19102)
ANAND K S (AM.EN. U4CSE19106)
BHARATH PRATHAP NAIR (AM. EN. U4CSE19113)
GAUTHAM SANTHOSH K (AM.EN. U4CSE19121)

1
CONTENTS
1.INTRODUCTION-----------------------------------------------------------------------------------------------------------------------------4

2.ABSTRACT------------------------------------------------------------------------------------------------------------------------------------5

3.USECASE DIAGRAM------------------------------------------------------------------------------------------------------------------------6

3.1.ACTORS--------------------------------------------------------------------------------------------------------------------------7

3.2.FUCTIONALITIES---------------------------------------------------------------------------------------------------------------7

4.CLASS DIAGRAM --------------------------------------------------------------------------------------------------------------------------11

4.1.HOTEL CLASS------------------------------------------------------------------------------------------------------------------12

4.2.EMPLOYEE CLASS------------------------------------------------------------------------------------------------------------12

4.3.MANAGER CLASS-------------------------------------------------------------------------------------------------------------13

4.4.CHEF CLASS--------------------------------------------------------------------------------------------------------------------13

4.5.OWNER CLASS----------------------------------------------------------------------------------------------------------------14

4.6.CUSTOMER CLASS-----------------------------------------------------------------------------------------------------------14

4.7.MENU CLASS------------------------------------------------------------------------------------------------------------------15

4.8.DISHES CLASS-----------------------------------------------------------------------------------------------------------------15

5.DATABASE DETAILS ----------------------------------------------------------------------------------------------------------------------16

5.1.HOTEL TABLE------------------------------------------------------------------------------------------------------------------16

5.2.EMPLOYEE TABLE------------------------------------------------------------------------------------------------------------16

5.3.HOTELEMP TABLE------------------------------------------------------------------------------------------------------------16

5.4.CHEF TABLE--------------------------------------------------------------------------------------------------------------------16

5.5.MENU TABLE------------------------------------------------------------------------------------------------------------------17

5.6.DISH TABLE--------------------------------------------------------------------------------------------------------------------17

5.7.PARTOF TABLE----------------------------------------------------------------------------------------------------------------17

5.8.COOKS TABLE-----------------------------------------------------------------------------------------------------------------17

6.PROJECT FEATURES----------------------------------------------------------------------------------------------------------------------18

6.1.HOME PAGE------------------------------------------------------------------------------------------------------------------18

6.2.LOGIN PAGE------------------------------------------------------------------------------------------------------------------19

6.3.ADMIN VIEW-----------------------------------------------------------------------------------------------------------------20

2
6.4.SENIOR MANAGER VIEW-------------------------------------------------------------------------------------------------28

6.5.MANAGER VIEW------------------------------------------------------------------------------------------------------------32

6.6.HEAD CHEF VIEW-----------------------------------------------------------------------------------------------------------34

6.7.CHEF VIEW-------------------------------------------------------------------------------------------------------------------37

6.8.CUSTOMER VIEW----------------------------------------------------------------------------------------------------------40

3
1. INTRODUCTION

This project focusses on applying OOPS concepts to build an application for a chain of hotels. The Hotel
Management System provides a window for each of the employees in the Hotel that helps them to ease
their access to information and implement certain functionalities.

The application is meant to be used by the Owner of the restaurant, Senior and Branch Managers, Chefs
and Head Chefs as well as the customers of the restaurant. Each of the Employees have a customized
view for each of them depending upon their role in the Hotel.

Java Swings have been used in this project to implement the UI for the application. The project also
uses Java Database Connectivity to insert, access, update and delete data from the Hotel Management
System database.

4
2. ABSTRACT

An entrepreneur starts a group of hotels in important cities of different states. This is a


automation software that helps in multiple Hotel branch management, chef and staff
management, menu management, Resource crisis management etc.

Each hotel has Hotel id, Hotel name, start date, revenue, expenditure, city and state. The
chefs in the hotel are identified by a social security number (SSN), and are also described by
a name, date of join and a cuisine in which he/she specializes. The chefs may be asked to
work in more than one branch if shortage demands. There is a specific menu card for each
hotel. Each of the hotels has a manager that takes care of the needs of the particular branch.
Also, there is a Senior Manager that manages a small group of hotels. Each food item in this
list is then assigned to a chef based on his specialization.

5
3. USE-CASE DIAGRAM

Note: Class diagram is uploaded separately too.

6
3.1. Actors:
1. Admin
2. Senior Manager
3. Branch Manager
4. Head Chef
5. Chef
6. Customer

3.2. Functionalities:

• System login:
Description: The functionality that allows users to login and gain access to the system. After logging in,
it verifies for the user using a verify login access functionality which implemented by an include
relationship. If the login is wrong, an error message will be shown that is implemented using extend
relationship.
Actors: Admin, Branch Manager, Senior Manager, Chef, Head Chef,

• Update and View Personal Details:


Description: It's a functionality that enables the user to view and update their personal details into the
system.
Actors: Branch Manager, Senior Manager, Admin, Chef, Head chef.

• View Branch Details:


Description: This functionality allows user to view important details about the branch.
Actors: Admin, Chef, Head chef, Branch Manager, Senior Manager.

• Update Branch:
Description: This functionality allows the user to update any information about the particular branch.
Actors: Admin, Branch Manager, Senior Manager.

• Appoint employee:
Description: This functionality helps the user to add newly appointed employee’s details to the system.
7
Actors: Admin.

• Fire Employee:
Description: This functionality helps the user to remove a particular employee’s details from the system
when he/she is fired from the hotel.
Actors: Admin.

• Check next maintenance:


Description: This functionality helps the user to check the upcoming maintenance check and also notify
if any maintenance is due.
Actors: Admin, Senior Manager.

• View official details:


Description: This functionality helps the user to see his/her salary and other official details. It acts as a
parent function for Update official details.
Actors: Chef, Senior Manager, Branch Manager.

• Update official details:


Description: This functionality allows the user to update salary and other official details of the
employees. It has salary function and chef location included with it which is used to update salary and
location respectively.
Actors: Admin, Senior Manager.

• Salary:
Description: This functionality allows the user to access salary details of employees. It has an extended
relationship with Bonus and is included in Expenditure(base) as salary is part of the Expenditure for the
hotel.
Actors: Admin, Senior manager.

• View menu:
Description: In this functionality, it allows the user to see the food menu of the restaurant.

8
Actors: Chef, Head Chef, Customer, Admin, Senior Manager, Branch Manager.

• Update Dishes:

Description: This functionality is an inherited functionality from View Menu. In this functionality, it
allows the user to add/remove any dishes.
Actors: Head chef, Branch Manager, Senior Manager, Admin.

• Update Prices:
Description: This functionality is being inherited from Update Dishes functionality. This functionality
allows the user to update the prices of the dish. It also has a extends relationship to Weekend Prices.
Weekend prices is a functionality that allows the user to apply special prices during weekends.
Actors: Admin, Branch Manager, Senior Manager.

• Order Dishes:
Description: It’s a functionality that allows the user to place orders. It also has an extended relationship
to a functionality Get Bottle water that asks if the customer wants bottled water.
Actors: Customer.

• Profitability:
Description: It’s a functionality that helps to determine whether the hotel is on profit or loss. If the
revenue is greater than the expenditure then the hotel is on profit, else it's in a loss. It has included
relationship with both Expenditure and Revenue which helps in determining the profitability.
Actors: Admin, Senior Manager.

• Update revenue and Expenditure:


Description: It's a functionality that updates revenue based on the orders. The Money obtained from each
of the orders by the Customer is added to the Revenue generated by the Hotel. Hence, it includes money
obtained from Payment.

9
This functionality also allows you to see the expenditures of the hotel. The expenditure is the amount of
money required to buy the raw materials for the kitchen and the salary to be paid to the employees. It
includes Salary.
Actors: Admin, Senior Manager.

• Payment:
Description: It's a functionality that allows the user to make payments. It also has an extended relationship
with Bulk Order Price that calculates a special rate for bulk orders and payment is a part of revenue and
hence it's an included relationship to Revenue.
Actors: Customer.

10
4. CLASS DIAGRAM

Note: Class diagram is uploaded separately too.

11
4.1. Hotel Class:
It contains the data members:
• integer Hid which is the hotel id, declared as protected data member to provide partial data hiding.
• String Hname which is Hotel name, declared as a public data member.
• String BranchmgrSSN that is SSN of Branch Manager, declared as a protected data member.
• Object of menu class Menuobj ,declared as protected data member.
• double Revenue, declared as private data member.
• double Expenditure, declared as private data member.
• double Raw_material_cost ,declared as private data member.
• String Hcity that is the city where the hotel is located in, declared as a public data member.
• String HState that is the state where the hotel is located in, declared as a public data member.
• Date LastMaintenancedate is the date when last maintenance check was done, declared as a private
data member.
The class also contain certain methods defined. They are:
• void ViewBranchDetails(), which prints details of the branch details, declared as a public method.
• void, UpdateBranchDetails , which enables the user to update branch details,declared as a protected
method.
• void ViewProfitability, which checks the hotel is running on a profit or not by comparing the revenue
to the expenditure of the hotel.
• bool CheckMaintenance which checks if maintenance is work done in the hotel at correct intervals by
comparing the present date with the last maintenance check's date.

4.2. Employee Class:


The employee interface is a part of hotel class, that is, the employee class exits only if the hotel class exists and
hence the relationship between employee interface and hotel class is a composition. Since one hotel contains
several employees, its multiplicity is defined as one to many.
The employee class is defined as an interface class and has some methods defined in it. All the methods in the
interface are abstract methods and will be implemented in both Chef and Manager with their own specifications.
It also provides abstraction to various details of Manager and chef. The abstract methods are:
• void ViewPersonalDetails(), which gives the personal details of the employee. It is declared as a public
method.
• void ViewOfficialdetails(), which gives the official details of the employee. It is declared as public
method.
• bool Login (), enables the user to gain access to the Hotel Management System. Its declared as a public
method.
• void UpdatePersonaldetails(), enables user to update any personal details. It is defined as a public
method.

12
4.3. Manager Class:
The manager class implements the employee interface and hence all the abstract methods defined in the
employee interface is implemented here and it has an interface realization also shares a manages relationship
with Hotel class that has a multiplicity of 1 to 2, which means that a hotel can have 2 managers which are
Senior manager and Branch Manager.
The data members defined in it are:
• String SSN, which is the social security number of the manager.It is defined as a protected data member.
• String Fname , is the first name of the manager.It is declared as a public data member.
• String Lname , is the last name of the manager.It is declared as a public data member.
• String Address, is the address of the manager.It is declared as a protected data member.
• String Phone, is the contact number of the employee.It is declared as a protected data member.
• double Salary,is the salary which the manager earns.It is declared as a protected data member.
• Date DOJ, is the date of joining of the manager.It is declared as protected data member.
• String Designation, is the designation of the manager.It is declared as a public data member.
• Object of hotel class, Workplace, is the workplace of the manager. It is declared as public data member.
In addition to the abstract methods defined in employee interface, this class has certain other methods defined in
it, which are:
• void UpdateWorkplace(), is a method that enables the manger to update the work place of manager. It
is declared as a protected method.
• void UpdateOfficialDetails(), is a method used to update the official details of all employees.It is
declared as a protected method.
• void CalculateBonus , is a method used to calculate the bonus of the employees.Its declared as a
protected method.

4.4. Chef Class:

The Chef class implements the employee interface and hence all the abstract methods defined in the employee
interface is implemented here and it has an interface realization. It also shares a cook's relationship with Dishes
class that has a multiplicity of many to many, which means that a hotel can have several dishes and several chefs.
The data members defined in it are:
• String SSN, which is the social security number of the chef. It is defined as a protected data member.
• String Fname , is the first name of the chef. It is declared as a public data member.
• String Lname , is the last name of the chef. It is declared as a public data member.
• String Address, is the address of the chef. It is declared as a protected data member.
• String Phone, is the contact number of the chef.It is declared as a protected data member.
• double Salary,is the salary which the chef earns. It is declared as a protected data member.

13
• Date DOJ, is the date the chef joined the hotel. It is declared as protected data member.
• String Specialisation, is the Cuisine in which the chef is specialised in.It is declared as protected data
member.
• String Designation, is the designation of the chef.It is declared as a public data member.
• Object of hotel class, Workplace, is the workplace of the manager. It is declared as public data member.

In addition to the abstract methods defined in employee interface, this class has another method defined in it,
which is:
• Void UpdateWorkplace() , which allows the chef to update the workplace.it is declared as a protected
method.

4.5 Owner Class


The owner class inherits the data members and member functions of the class manager. It also has some
member functions of its own.
The member functions in the class are:
• void FireEmployee(String SSN) member function allows the owner to Fire Employees which in turn
delete them from the database. Its declares as private.
• void HireEmployee() member function allows the owner to add new employees to the database. Its
declares as private.

4.6. Customer Class:


The customer class is a dependency of the class hotel. This is because this class has a method(Ordereddishes)
that uses the object of Hotel class.
The Data Members of this class are:
• orderedDishes: This is an array of strings which stores the dishID of the dishes that were ordered by
the customer
• orderWater: This is a variable used to keep track of the number of bottles of water ordered by the
customer.
The member functions of the class are:
• void ViewAndPayBill(): This function is used to display and then pay the bill after which the revenue is
updated in the database.
• double BulkOrderPrice(double price): This function is used to check if the customer ordered food
worth more than a particular and then return the discounted amount.
• int Orderdishes(Hotel obj): This function allows the customer to order the dishes he wants. It also
checks whether the customer wants waterbottles. The Did of the dishes he wants is added to the String[]
OrderedDishes.
14
• bool isWeekend() function is used to check whether the current day is a weekend. If it is a weekend
then a special discount is applied.

4.7. Menu Class:


Menu Class is a part of hotel class, that is, the menu class exits only if the hotel class exists and hence the
relationship between employee interface and hotel class is a composition. Since one hotel has only 1 menu, the
multiplicity is 1 to 1.

Some of the attributes defined in it are :


• String Menuid , is the id of the menu.It is declared as a public data member.
• String array Availdishes , stores all the dishes in the menu as an string array.It is declared as a public
data member.
One method defined in it is:
• void ViewMenu, used to view the menu. Its declared as a public method.

4.8. Dishes Class:


The dishes class is an aggregated class from the menu. Its an aggregation as dishes is a part of the menu and can
exist independently even if it is not in a menu.
Since a menu can have multiple dishes in it, the multiplicity of the relationship is 1 to many (1..*).
Some the data members defined in it are:
• String Dishid , is the id of each of the dish. It is declared as a public data member.
• String Dishname , is the name of the dish in the menu. It is declared as a public data member.
• double Price, is the rate of each dish in the menu. It is declared as a public data member.
There are 2 methods defined in this class. They are:
• double UpdatePrice() , which allows the user to update the price of the dish. It is declared as a
protected method.
• void AddDish() , which allows the user to add a dish to the menu. It is declared as a protected method.

15
5. DATABASE DETAILS

There are 8 tables in the Hotel Management Database. The details of each of them are given
below.

5.1. HOTEL TABLE


This table contains the basic details of the Hotel branches.
Column name Datatype
Hid varchar(20)
Hname varchar (50)
Sdate(start date) date
Revenue numeric (50,2)
Expenditure numeric (50,2)
City varchar (50)
State varchar (50)
Last Maintenance date

5.2. EMPLOYEE TABLE


This contains the details of the Employees working in the hotel.
Column name Datatype
ssn varchar(20)
fname varchar (50)
lname varchar (50)
doj date
sal(salary) numeric (25,2)
designation varchar (50)
phone varchar (12)
address varchar (50)

5.3. HOTELEMP TABLE

This table maps the Employee to a particular Hotel


Column name Datatype
ssn Varchar (20)
hid varchar (20)

5.4. CHEF TABLE


16
This table contains the data about the social security number of each Chef along with their speciality.
Column name Datatype
ssn Varchar (20)
speciality varchar (50)

5.5. MENU TABLE


This table contains the menu id of each hotel along with its hotel id and the number of dishes in that particular
hotel/menu.
Column name Datatype
mid varchar (20)
hid varchar (20)
Number of items integer

5.6. DISH TABLE


This table contains contains dishid, dishname and its price.
Column name Datatype
did varchar (20)
dname varchar (50)
price numeric

5.7. PARTOF TABLE


This table maps menu id with dish id.
Column name Datatype
mid varchar (20)
did varchar (20)

5.8. COOKS TABLE


This table maps dish id with the corresponding chefs.
Column name Datatype
did varchar (20)
ssn varchar (20)

17
6.PROJECT FEATURES

6.1. HOME PAGE

This is the homepage of the application. We have set a background image for the homepage
with the logo of the restaurant. We also have 2 JButtons View Menu and Login.
The View Menu Option is for customers to access the menu and place their orders. The login
button is for the Employees in the hotel to access the Hotel Mangement System and its database
depending upon their designation in the hotel. The background image is added using
Imageicon.

18
6.2. LOGIN PAGE (Normal login and Admin login)

This frame helps all Employees to login in into the System. It is to be noted that the
Owner/Admin has a different login page. The login username is the first name and password is
the ssn of the Employee. Depending on the ssn each employee will haave a different view
depending upon one’s designation.

19
6.3 ADMIN VIEW
Once logged into the admin page, the admin has various functionalities. Each of these functionalities has a
panel which can be accessed by the JButton at the left side menu.
6.3.1 HIRE EMPLOYEE

Hire Employee function is implemented in this panel. The details of the new Employee are entered into the
TextFields which is accessed by the HireEmployee function in the Owner class.
In the HireEmployee function, we use a preparedStatement to execute the INSERT query. The insert query is
implemented and the details of the Employee is inserted into the database and a using JOptionPane we give an
alert informing that the information have been entered. In case, wrong credentials have been entered like a
HotelId which is not in the database, we get a pop-up message using JoptionPane which says “Invalid
Credentials”.

20
6.3.2 FIRE EMPLOYEE

Fire Employee function is implemented in this panel. The ssn of the Employee to be deleted is entered through
the Textbox. The employee having the corresponding SSN will be deleted from the database which indicates
that the employee is fired from the hotel.

21
6.3.3 PROFITABILITY

This feature helps the admin to know which all branches are in profit and which all branches are in loss. The UI uses
radio button. When a radio button is pressed the Hname of the corresponding branch is taken and uses this information
to retrieve the revenue and expenditure corresponding to the button selected. The value of expenditures – revenue is
computed and it is determined whether the hotel is in profit or not and the result is printed out using a Jlabel.

22
6.3.4 CHECK MAINTENANCE

This helps the admin to know which all branches have their maintenance checks on due. This is done by obtaining the
Hotel Name based on the radio button clicked. The last maintenance date is obtained from the database and compared
with the current date which is obtained by importing java.util.date. If the difference between the current date and the
last maintained date is greater than 365 days. This helps the Owner to keep in track of the maintenance issues with his
hotel.

23
6.3.5 VIEW BRANCH DETAILS

The owner chooses a hotel branch using a radio button. Based on his choice, the data pertaining to the corresponding
branch is printed using JLabel.

6.3.6 UPDATE BRANCH DETAILS

The branch is selected with the help of a radio button. Depending on the choice, we update the revenue and
expenditure using the data we retrieve from the textbox given. The ActionListener of update button calls the update
24
Branch details of hotel class to implement the process and also gives a pop implemented using JOptionPane which
shows the message “Details updated”.

6.3.7 UPDATE OFFICIAL DETAILS

This panel is used by the Owner to update the Official details of an Employee like Designation (during a promotion) , the
workplace (in case of transfer) and the salary of the Employee. This is done by giving the required details in the
Textboxes, beginning with the ssn of the Employee to whom the changes have to be made.

We insert the salary% only. With the percentage, we calculate the new salary. We also take into consideration the
difference between the year he joined to the current year to give him bonus.

The ActionListener of the update button calls the UpdateOfficialdetails() in Manager class which in turn calls
UpdateWorkplace() and CalculateBonus() as per requirement and also gives a pop implemented using JOptionPane
which shows the message “Details updated”.

25
6.3.8 UPDATE PERSONAL DETAILS

This is used to update the personal details of the Owner. Personal data such as Phone and address are bound to change
as time progresses and hence it is important to update the changes in the database.

The data entered in the TextField is used to update the details of the Owner. The Update button when pressed calls the
UpdatePersonaldetails function which updates the value of Phone and Address with the help of the SSN we retreived as
password while logging into the system and also gives a pop implemented using JOptionPane which shows the message
“Details updated”.

26
6.3.9 UPDATE DISH PRICE

Dish id of the the dish to be updated is given in a textfield and the updated price for the particular dish in another text
box. This data is used to update the details of the dish in the database.

While we click update, the Actionlistener calls the UpdateDish() in dish class and also gives a pop implemented using
JOptionPane which shows the message “Details updated”.

27
6.4 SENIOR MANAGER VIEW

The view for Senior Manager is very similar to that of Owner with the option of Hiring and Firing Employees
not available for senior manager and hence only screenshots have been given wherever it is the same
functionality and difference in functionalities have been mentioned.

6.4.1 UPDATE PERSONAL DETAILS

It provides the same functionality to Senior Manager that it provides to Owner as explained in 6.3.8.

28
6.4.2 VIEW OFFICIAL DETAILS

This panel helps the Employee to view his official details like SSN, Designation, Workplace and salary. This is
implemeneted with the help of JLabel and the SSN entered while logging into the system.

29
6.4.3 UPDATE PRICES

It provides the same functionality to Senior Manager that it provides to Owner as explained in 6.3.9.

6.4.4 PROFITABILITY

It provides the same functionality to Senior Manager that it provides to Owner as explained in 6.3.3.

30
6.4.5 CHECK MAINTENANCE

It provides the same functionality to Senior Manager that it provides to Owner as explained in 6.3.4.

6.4.6 UPDATE OFFICIAL DETAILS

It provides the same functionality to Senior Manager that it provides to Owner as explained in 6.3.7.

31
6.5. MANAGER VIEW

The view for Manager is very similar to that of Owner and Senior Manager with the option of Hiring and Firing
Employees along with Profitability, Check Maintenance and UpdateOfficialDetails() not available for manager
and hence only screenshots have been given wherever it is the same functionality and difference in
functionalities have been mentioned.

6.5.1. UPDATE PERSONAL DETAILS

This pane shows the current details of the Manager using a JLabel. Data once inserted into the TextField will be updated
in the JLabel shown as well as in the database. The ActionListener of the button along with handling the updation will
also give a pop-up that the details have been updated.

32
6.5.2. VIEW OFFICIAL DETAILS (Same as 6.4.2)

6.5.3. UPDATE PRICES (Same as 6.4.3)

33
6.6. HEAD CHEF VIEW

The view for Manager is very similar to that of Owner and Senior Manager hence only screenshots have been
given wherever it is the same functionality and difference in functionalities have been mentioned.

6.6.1. VIEW BRANCH DETAILS (Same as 6.4.3)

The details of the branch in which the Chef is working is displayed with the help of a JLabel. It is to be noted
that classified information such as the revenue and expenditure of the branch is not visible for the Chef.

34
6.6.2. UPDATE PERSONAL DETAILS (Same as 6.5.1)

6.6.3. VIEW OFFICIAL DETAILS (Same as 6.4.2)

35
6.6.4. VIEW MENU

Based on the SSN of the Head Chef we print the Menu of the branch he is working in with the help of a JTable.

6.6.5. ADD DISHES

Data from the Textfields are added to the data base using addishes(). Also a pop-up is enabled along with button.

36
6.7. CHEF VIEW

Chef has only a part of the functions that a head chef has. Since the functionalities have been explained earlier, only the
screenshots have been attached.

6.7.1. VIEW BRANCH DETAILS (Same as 6.4.3)

37
6.7.2. UPDATE PERSONAL DETAILS (Same as 6.5.1)

6.7.3. VIEW OFFICIAL DETAILS (Same as 6.4.2)

38
6.7.4. VIEW MENU (Same as 6.6.4)

39
6.8. CUSTOMER VIEW

The customer view allows the customer to choose a hotel and order dishes from their menu and pay the bill.

6.8.1 SELECT HOTEL

This pane helps the customer to choose the hotel from which he wants to get food from. The Hotels are given as radio-
button options. After selecting the hotel, we give the select button which takes the food ordering process to the next
page as well as stores the Hname of the selected hotel for future purposes to complete the transaction.

40
6.8.2 SELECT DISHES

This is the second stage of the food-ordering process. Here we have the dishes of the hotel selected in previous step as a
drop-down for the customer to choose his dish from. When the customer selects the quantity and presses the AddItem
button, the details are printed below with the help of a JTable. Also the customer can choose the number of water
bottles he requires in the TextField above with the button at its sides. We then click Place Order button which takes us
to the last step of Ordering a dish.

41
6.8.3. PAY BILL

The details of food items selected and added to the JTable was added to an ArrayList and is then printed with another
JTable in the payment page. We see that the total amount calculated using ViewandPayBill() is displayed using a JLabel.
Pressing the Paybill option will add the corresponding amount to the Revenue of the selected hotel and will also give a
pop message using JOptionPayment that confirms successful Payment.

42

You might also like