You are on page 1of 37

i

VIETNAM GENERAL CONFEDERATION OF LABOUR


TON DUC THANG UNIVERSITY
FACULTY OF INFORMATION TECHNOLOGY

PROJECT : ANALYSIS AND DESIGN


OF HOTEL MANAGEMENT SYSTEM.

Instructor: Mr. Pham Thai Ky Trung


Excutor : Pham Cao Nam Hai – 51600023
NAME GROUP: Một mình bơ vơ
Class : 16050310

HO CHI MINH CITY, YEAR 2019


ii

THANKS
Thanks Mr.Trung helped us over the past time to successfully complete this
project.
iii

SUMMARY

Building hotel management application, customers can book rooms, cancel rooms,
assess guest management staff.
1

CATEGORY
I. CHAPTER 1 – USE CASE SPECIFICATION……. PAGE 2
II. CHAPTER 2 – USE CASE DIAGRAM…………….PAGE 26
III. CHAPTER 3 – RELATIONSHIP DIAGRAM……………….PAGE 30
IV. CHAPTER 4 – REFERENCES……………………..PAGE 33
2

I. CHAPTER 1 – USE CASE SPECIFICATION


1.The agent of the system :
- ADMINSTRATOR
- RECEPTIONNIST
- CUSTOMER
2. Specification:

ID: UC01 CONTENT


Use-Case Name Login
Describe Use-case allows users to log into the
system to perform their functions ..
Actor Administrator, Receptiontst.
Activation conditions When the user selects the login
function from the console.
Pre-condition The user must have an account in
the database
Post-conditions User login successfully.
Main event flow 1. In the console, show line 1 as
administrator, line 2 is
Recceptiontst, and row 3 is
Customer line.
2. User Enter 1 or 2 to log in actor
administrator or Recceptionts
administrator or Recceptiontst
3. User enters user and password
4. If successful, display a
successful login message
5. Use-case end
Sub-event flow When a user enters an incorrect
username and password, report a
failed login and return to the
console system at first. (ie when
3

clicking Run project)

ID: UC02 CONTENT


Use-Case Name Check free room status
Describe Use-case allows checking and
returning an empty room list.
Actor Customer, Receptionist.
Activation conditions When Receptionist enters the
number 1 from the console system or
enters the number 2 to perform
"Check In for a customer" or
Customer performs "To Book" or
"Check In".
Pre-condition After successful login, if the
Receptionist or actor use is customer.
Post-conditions Returns the empty room list.
Main event flow 1. Confirm login successfully,
access the Room entity in the
database and return the empty
Room.
2. The Save Room is empty into an
ArrayList.
4

3. Return the ArrayList.


4. End Use-case

Sub-event flow 1. After returning ArrayList, println


this ArrayList
2. Return to the console screen after
the Actor successfully login to the
console screen after the user
selects the customer screen or
returns to the console screen
when Recceptiontst uses "chcck
in for a customer".

ID: UC03 CONTENT


Use-Case Name To book
Describe Use-case allow booking of hotel
rooms
Actor Customer.
Activation conditions Enter the number 1 from the
keyboard at the console
Pre-conditions When the user selects the actor
customer at the first console section
when running the program
Post-conditions Successful booking
5

Main event flow 1. After actor is customer, the


current system of customer
function information can be
performed.
2. Enter the number 1 to execute
3. Return the list of available rooms.
4. If there is no room, notify and
return to number 1.
5. If there is an empty room, please
enter the room name you want to
book.
6. Enter the customer name.
7. Enter the phone number.
8. Save customer information to the
customer object and save it to the
database.
9. Notice "successful booking and
reception will call you back to
confirm”
10.End use-case
Sub-event flow 1. After successful, return to the
screen at the beginning after the
user selects actort customer

ID: UC04 CONTENT


Use-Case Name Cancel a reservation
Describe Use-case allows cancellation of
reservations made at the hotel
6

Actor Customer.
Activation conditions Enter number 2 from the keyboard at
the console
Pre-condition When the user selects the actor
customer at the first console section
when running the program
Post-conditions Cancel a successful booking
Main event flow 1. After actor is customer, the
current system of customer
function information can be
performed.
2. Enter the number 2 to excute
3. Please enter the room name you
have booked.
4. Enter the customer name.
5. Enter the phone number.
6. Check the information in the
database
7. If it is correct, the message
"Cancel the reservation
successfully" and return to 1.
8. End Use-case

Sub-event flow 1. If the step 6 information of the


main event flow is wrong in the
database
2. Notice of "unsuccessful booking"
3. Return to step 1 in the main event
stream
7

ID: UC05 CONTENT


Use-Case Name Pay a bill
Describe Use-case allows to show the amount
to be paid
Actor Customer.
Activation conditions Enter number 3 from the keyboard at
the console
Pre-condition When the user selects the actor
customer at the first console section
when running the program
Post-condition Paid
Main-event flow 1. After actor is customer, the
current system of customer
function information can be
performed.
2. Enter the number 3 to excute
4. Please enter id of bill
5. If correct, show bill information
6. End use-case
Sub-event flow 1. When the user enters an error, ask
the user to re-enter it?
2. If the user wants, allow the user
to re-enter until the user refuses
to enter.
8

ID: UC06 CONTENT


Use-Case Name Check in for a customer
Decribe Use-case allows you to check in for
customers, save customer
information in the database.
Actor Receptionist
Activation conditions Enter number 2 from the keyboard at
the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when
running the program
Post-condition Check in successfully
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter the number 2 from the
keyboard
3. The room information display
system is empty (UC02)
4. Enter the room number
5. Enter customer information
6. Save customer information to the
system
9

7. Change the room condition


8. Notice of "successful checkin"
9. Return to item 1
10.End use-case
Sub-event flow 11.In case there is no room available,
the notice "check in fails"
12. Return to item 1 of the main
opinion flow.

ID: UC07 CONTENT


Use-Case Name Check not free room status
Decribe Use-case allows to show a list of
room information that has been
occupied
Actor Receptionist
Activation conditons Enter number 3 from the keyboard at
the console
Pre-conditon When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Returns the list of rooms that have
been in the list
10

Main-event flow 1. The system displays the functions


that Act Recceptionist can
perform.
2. Enter the number 3 from the
keyboard
3. The system displays a list of non-
empty room information.
4. Return to item 1.
5. End use-case.
Sub-event flow 1. In the absence of this room list, the
notice "all rooms are empty"
2. Return to item 1 of the main
opinion flow.

ID: UC08 CONTENT


Use-Case Name Check out for a customer
Decribe Use-case allows check out for a
customer
Actor Receptionist
11

Activation conditions Enter the number 4 from the keyboard


at the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Return to checkout room
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter the number 3 from the
keyboard
3. The system displays a list of non-
empty room information (UC07)
4. Enter the checkout room number
5. Change the room condition to be
empty
6. Returns the Room object.
7. Return to item 1.
8. End use-case.
Sub-event flow 1. If you enter the wrong room,
notice "this room has not checked
in"
2. If the rooms are not checked in,
the message "All rooms are not
checked in, please check again".
3. Return to item 1 of the main
opinion flow.
12

ID: UC09 CONTENT


Use-Case Name Create a bill
Decribe Use-case allows creation of payment
invoices
Actor Receptionist
Activation conditions Enter the number 5 from the keyboard
at the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Returns bill
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter the number 5 from the
keyboard
3. UC08 implementation system
4. Create object of bill including the
full name and customer name,
room number, date of arrival, date
of departure, room charge, other
service fee, total.
5. print bill
6. Save bill to database
13

7. Delete customer information in the


room.
8. Return to number 1.
9. End use case
Sub-event flow 1. If the room has not checked out,
the notice "create bill failed"
2. Return to item 1 of the main event
stream

ID: UC10 CONTENT


Use-Case Name Check book
Decribe Use-case allows to create check list of
customers booking
Actor Receptionist
Activation Enter the number 6 from the keyboard
at the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Returns the list of reservation
customers
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter number 6 from the keyboard
3. The database retrieval system
returns the list of customer
reservations
4. Return to number 1
5. Finish the use case
Sub-event flow If the room list is empty, the
message "No one has booked"
14

ID: UC11 CONTENT


Use-Case Name Agree to book
Decribe Use-case allows booking confirmation

Actor Receptionist
Activation conditions Enter the number 7 from the keyboard
at the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Accept the reservation
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter the number 7 from the
keyboard
3. The system requires entering the
booked room number
4. Date of arrival
5. Days to go
6. System to change room
information
7. Return to item 1
15

8. End use case

Sub-event flow 1. If the room number is not


available, report "wrong room,
please check again" error.
2. Return to the number 1 of the main
event flow

ID: UC12 CONTENT


Use-Case Name Refuse to book
Decribe Use-case allows confirmation from
booking
Actor Receptionist
Activation conditions Enter the number 8 from the keyboard
at the console
Pre-condition When the user selects actor
Receptionist and successfully logs in
the first console section when running
the program
Post-condition Refuse to accept reservations
Main-event flow 1. The system displays the functions
that Act Recceptionist can
perform.
2. Enter the number 8 from the
keyboard
3. The system requires entering the
room number to refuse to book
4. Check that the reservation list is
the same as the room you want to
reject
16

5. If duplicated, delete the room from


the list
6. Update the database
7. Return to number 1
8. End use case
Main-event flow 1. If checking the wrong room
information, the message
"Rejection of booking failed,
please check the information"
2. Return to the number 1 of the main
event flow

ID: UC13 CONTENT


Use-Case Name Change password
Decribe Use-case allows to change passwords

Actor Administrator
Activation conditions Enter the number 1 from the keyboard
at the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Change password successfully
Main-event flow 1. Function display system that can
be performed by actor
Administrator.
2. Enter the number 1 from the
keyboard
3. The system requires entering a
password
4. Confirm the password
5. Check in the database
6. If the same, update the password
again
17

7. Update the database


8. Notice of "successful password
change"
9. Back to number 1
10.End use case
Sub-event flow 1. If the information is wrong, the
message "You entered it
incorrectly, please do it again
later"
2. Return to the number 1 of the main
event flow

ID: UC14 CONTENT


Use-Case Name List empoyees
Decribe Use-case allows to display the
employees list
Actor Administrator
Activation conditions Enter number 2 from the keyboard at
the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Displays the list of employees
Main-event flow 1. Function display system that can
be performed by actor
Administrator.
2. Enter the number 2 from the
keyboard
3. Database access system
4. Return the list employees list
5. Print to the screen
6. Back to number 1
7. Finish the use case
18

Sub-event flow 1. If the empty list says "You have


not created an employee, please
update"
2. Return to the number 1 of the main
event flow

ID: UC15 CONTENT


Use-Case Name Room status
Decribe Use-case allows to show Room list

Actor Administrator
Activation conditions Enter number 3 from the keyboard at
the console
Pre-conditions When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Show room list
Main-event flow 1 Function display system that actor
Administrator can perform.
2 Enter 3 from the keyboard
19

3 Database access system


4 Returns the list room list
5 Print to the screen
6 Return to number 1
7 End the use case
Sub-event flow 1. If the empty list, the message
"Empty database, please update"
2. Return to the number 1 of the main
event flow

ID: UC16 CONTENT


Use-Case Name Create employee
Decribe Use-case allows to create employees

Actor Administrator
Activation conditions Enter the number 4 from the keyboard
at the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Create employees
Main-event flow 8 Function display system that can
be performed by actor
Administrator.
9 Enter the number 4 from the
keyboard
10 Request to enter information
including name, position, working
day, phone number,
accommodation, salary each
month
20

11 Database access system


12 Save information
13 Notice of "saving information
successfully"
14 Back to number 1
15 End use case
Sub-event flow 3. If the information is the same, the
message "Save employee
information failed, please check
again"
4. Return to the number 1 of the main
event flow

ID: UC17 CONTENT


Use-Case Name Delete employee
Decribe Use-case allows to delete employees

Actor Administrator
Activation-condition Enter the number 5 from the keyboard
at the console
Pre-ondition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Delete employee
Main-event flow 1. Function display system that can
be performed by actor
Administrator.
2. Enter the number 5 from the
keyboard
3. Please enter the employee ID you
want to delete
4. Ask for admin password
5. How to access the database of
trusted news
21

6. If true, delete the employee


7. Notice of "deleting successful
employees"
8. Return to item 1
9. Finish the use case
Sub-event flow 1. If the information is not found, the
message "Delete employee
information failed, please check
again"
2. If the password is wrong then the
request to re-enter is correct or
actor refuses to use this function
3. Return to the number 1 of the main
event flow

ID: UC18 CONTENT


Use-Case Name Create account employee
Decribe Use-case allows you to create
Employee accounts
Actor Administrator
Activation condition Please enter the number 6 from the
keyboard in the interface
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Create an employee account
Main-event flow 1 The system displays the functions
that the Administrator
Administrator can perform
Function display system that actor
Can perform.
2 Enter number 6 from the keyboard
22

3 User input required


4 Password is required
5 Confirm the password
6 Update to the database
7 Return to item 1
8 End use case
Sub-event flow 1 If the password is entered
incorrectly, re-enter it until it is
correct or the actor refuses to
create an account
2 Return to the number 1 of the main
event stream

ID: UC19 CONTENT


Use-Case Name Change account employee
Decribe Use-case allows you to change your
Employee account
Actor Administrator
Activation conditions Enter the number 7 from the keyboard
at the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Change employee account
Main-event flow 3 Function display system that can
be performed by actor
Administrator.
4 Enter 7 from the keyboard
5 Requesting to enter a user wants to
change
6 Password is required
7 Confirm password
23

8 Update lên database


9 Return to item 1
10 End use case
Sub-event flow 11 If the password is entered
incorrectly, re-enter it until it is
correct or the actor refuses to
create an account
12 Return to the number 1 of the main
event stream

ID: UC20 CONTENT


Use-Case Name delete account employee
Decribe Use-case allows you to delete
Employee accounts
Actor Administrator
Activation condition Enter the number 8 from the keyboard
at the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Change employee account
Main-event flow 1. Function display system that can
be performed by actor
Administrator.
2. Enter the number 8 from the
keyboard
3. Request to enter user who wants to
delete
4. Ask for admin password
5. If true, delete the account
6. Update to database
24

7. Notice of successful deletion


8. Return to item 1
9. End use case
Sub-event flow 1. If you enter the wrong password,
please re-enter it until it is correct
or the actor refuses to delete the
account
2. Return to the number 1 of the main
event flow

ID: UC21 CONTENT


Use-Case Name Show account employee
Decribe Use-case allows to display the
employees list
Actor Administrator
Activation condition Enter the number 9 from the keyboard
at the console
Pre-condition When the user selects actor
Administrator and successfully logs in
the first console section when running
the program
Post-condition Displays the list of employees
Main-event flow 8. Function display system that can
be performed by actor
Administrator.
9. Enter the number 9 from the
keyboard
25

10.Database access system


11.Return list list employees
12.Print to the screen
13.Back to item 1
14.End use case
Sub-event flow 1. If the empty list says "You
have not created an
employee account, please
update again"
2. Return to the number 1 of
the main event flow
26

II. CHAPTER 2 – USE CASE DIAGRAM


Build use case diagram
27
28
29
30

III. CHAPTER 3 – RELATIONSHIP DIAGRAM


31
32
33

IV. REFERENCES
https://coderanch.com/t/317199/java/connecting-remote-PostgreSQL
https://www.wisdomjobs.com/e-university/ejb-enterprise-javabeans-tutorial-
874/ejb-access-database-22167.html
https://www.tutorialspoint.com/ejb/ejb_access_database.htm
https://developer.jboss.org/people/fjuma/blog/2017/09/08/getting-started-with-
ejbs-and-elytron-part-1
https://www.roseindia.net/ejb/entity-bean-example.shtml
https://www.youtube.com/results?search_query=xa-datasource+jboss+EJB+
https://www.tutorialspoint.com/ejb/ejb_access_database.htm
https://www.tutorialspoint.com/ejb/ejb_entity_relationships.htm
https://www.tutorialspoint.com/ejb/ejb_jndi_bindings.htm
https://www.tutorialspoint.com/ejb/ejb_query_language.htm
https://www.progress.com/tutorials/jdbc/javabeans-and-jboss
https://ejbvn.wordpress.com/category/week-2-entity-beans-and-message-driven-
beans/day-09-using-jdbc-to-connect-to-a-database/
https://www.theserverside.com/discussions/thread/29580.html
https://www.youtube.com/results?search_query=ejb+postgressql
https://stackoverflow.com/questions/42051463/trying-to-connect-to-ejb-on-wildfly-
10-1-and-getting-session-id-hasnt-been-set
https://stackoverflow.com/questions/3587289/ejb-stateless-session-beans-and-
stateful-session-bean
http://www.java2s.com/Tutorial/Java/0415__EJB3/UseJDBCInEJB.htm
https://stackoverflow.com/questions/1482732/ejb-3-with-jdbc
https://www.youtube.com/results?search_query=JDBC+EJB+
34

https://coderanch.com/t/526464/java/schema-postgres
https://www.youtube.com/watch?v=UYUUGb1ykbQ
https://www.youtube.com/results?search_query=ejb+module+jboss+statefull
https://www.youtube.com/results?search_query=ejb+module+jboss
https://www.youtube.com/results?search_query=ejb+module+jboss
https://www.youtube.com/results?search_query=ejb+module+postgresql
https://www.youtube.com/watch?v=tco2yCjRKWU
https://www.youtube.com/watch?v=_yDSptmtC38
https://www.youtube.com/results?search_query=ejb+tutorial+with+postgresql
https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/EJB3_Ser
vices-Session_Beans.html
https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/EJB3_Ser
vices-Entity_Beans.html
https://www.youtube.com/watch?v=NM61Xt7SGmk
https://www.youtube.com/watch?v=76LkhwOa2Rw&t=2230s
https://www.youtube.com/results?search_query=ejb+tutorial+for+beginners
https://www.youtube.com/watch?v=jhcoCVWyQDs&list=PLGwb7xZHg-
oOIpRuAK8dgqA2lEv2s2PS5
https://issues.jboss.org/browse/JBEAP-
9355?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-
tabpanel&showAll=true
https://issues.jboss.org/browse/JBEAP-
9355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
tabpanel&showAll=true
http://tuanha96.blogspot.com/2016/10/ejb-30.html

You might also like