You are on page 1of 21

Hotel Management System

ANALYSIS AND DESIGN MODELS

prepared by Team 1

Sandra Busik
Susan Le
Peter Lockwood
Pradeep Miglani
Reita Sikka
Kai Zhang

1
TABLE OF CONTENTS
1 ANALYSIS MODEL.......................................................................................................................................................................................................................................................3
1.1 STATIC MODEL.......................................................................................................................................................................................................................................................3
1.2 ATTRIBUTES OF THE CLASSES ON THE STATIC MODEL.............................................................................................................................................................................4
1.3 STATE CHARTS.......................................................................................................................................................................................................................................................5
1.4 COLLABORATION DIAGRAMS (ONE FOR EACH USE CASE) & MESSAGE SEQUENCE DESCRIPTIONS.....................................................................................................8
2 DESIGN MODEL............................................................................................................................................................................................................................................................8
2.1 CONSOLIDATED COLLABORATION DIAGRAMS & MESSAGE SEQUENCE DESCRIPTIONS.................................................................................................................8
2.1.1 CONSOLIDATED COLLABORATION DIAGRAMS............................................................................................................................................................................................9
2.1.2 MESSAGE SEQUENCE DESCRIPTIONS FOR CONSOLIDATED COLABORATION DIAGRAMS...............................................................................................................11
2.2 DISTRIBUTED SOFTWARE ARCHITECTURE DOCUMENT..........................................................................................................................................................................13
2.2.1 DESCRIPTION OF HOW THE SYSTEM IS DECOMPOSED INTO COMPONENT-BASED SUBSYSTEMS & CONCURRENT COLLABORATION DIAGRAM...............13
2.2.2 DESIGN OF RELATIONAL DESIGN DATABASE.............................................................................................................................................................................................15
2.3 SUBSYSTEM SOFTWARE ARCHITECTURE....................................................................................................................................................................................................16
2.3.1 OVERVIEW DESCRIPTION OF SUBSYSTEM SOFTWARE ARCHITECTURE...............................................................................................................................................16
2.3.2 TASK ARCHITECTURE......................................................................................................................................................................................................................................17
2.4 INFORMATION HIDING CLASSES....................................................................................................................................................................................................................19

2
1 ANALYSIS MODEL

1.1 STATIC MODEL

Bill/Payment Scheduler Reservation


bills cancels

processes processes creates/modifies/deletes


Report

generates

HMS Employee HMS Room


completes processes updates
Interface

has processes
processes

Customer
Administration

Discount

3
1.2 ATTRIBUTES OF THE CLASSES ON THE STATIC MODEL

Customer HMS Interface Scheduler Discount


Database
customerID customerID customerID customerID
sqlString
lastName lastName reservationID reservationID
middleName firstName roomRate discountType
address middleName chargeRoom discountAmount
city discountType Room timeChargeForNoShow
state discountAmount roomNumber timeChargeForAdditionalDay
zip confirmationNumber timeChargeForGuaranteedRoom Administration
roomStatus
firstName reservationID employeeID
confirmationNumber roomNumber itemID
foodItems roomNumber
Employee HMS
foodAmounts
employeeID employeeID
Reservation discountType
userID employeeLogInStatus Bill/Payment
reservationID discountAmount
password userID
customerID customerID
password
roomNumber reservationID
roomAvailStatus paymentAmount
roomStatus Report creditAmount
reportType

Menu
menuItem

4
1.3 STATE CHARTS

Bill/Payment Statechart

Recieve & add item

Open

Adjust Bill Generate Bill

Generated

Record Payment

5
Room State Chart

RROOMoom Statechart

Vacant

Rm No entered when customer checks in

Five hrs. past check in


Rm. no. entered

Customer check out

Occupied Reserved
Room number entered when customer check in

6
Scheduler Statechart

Retrieve Time

System Started

Time is 1:00 p.m.


Scheduler Running Billing Additional Day

Billing Complete
System Stopped

Time is 6:30 p.m.

Billing Complete
Reservations Canceled

Time is 6:00 p.m. Billing Guaranteed Reservations

Cancelling Non-guaranteed Reservations

7
1.4 COLLABORATION DIAGRAMS (one for each use case) & MESSAGE SEQUENCE DESCRIPTIONS
We have done individual collaboration diagrams (one for each use case). Per Dr. Wu, they are not required to be turned in. Please see
Consolidated Collaboration Diagrams and Message Descriptions for Consolidated Collaboration Diagrams in section 2.1.1 and 2.1.2,
respectively.

2 DESIGN MODEL
2.1 CONSOLIDATED COLLABORATION DIAGRAMS & MESSAGE SEQUENCE DESCRIPTIONS

8
2.1.1 CONSOLIDATED COLLABORATION DIAGRAMS

CONSOLIDATED COLLABORATION DIAGRAM FOR RESERVATION & BOOKING SYSTEM


Get Pending CheckOut Data
: Hotel
: Report
Database
Pending CheckOutData returned
Get Discount

: Discount
Update / Retrieve Room Availability Info

Room Availability Info


: Room

Data returned
Av ailability
CheckRoomAv ailability (Ty pe, Dates) Update/Retriev e data
Apply Status
Discount
Set RoomAvailability

Update/Retriev e Customer Inf o Update Bill/Pay ment Data


Customer Inf o

Create/Update/Retriev e Customer Inf o Get Reserv ation Data


: Reservation : Customer
Reserv ation Data returned
Report GenerateReport Customer Inf o
Generated (PendingCheckOutRpt,
ReportParameters) Cancel Non-Guaranteed
reserv ation
Generate Bill : Scheduler Scheduler Ev ents
Charge Bill
Credit Bill
Reserv ation Inf o Bill No-Show
Bill Additional Day : <<External Timer>>
Bill Guaranteed Reserv ation Digital Clock
Create/Retriev e/Update Reserv ation, CheckIn, CheckOut (Trans Data)

<<user interface>> Make Pay ment, Credit Pay ment


: Bill/Payment
: HMSInterface
Pay ment made, Pay ment credited

Display Info
Display Inf o
CSR Input Get Room/FoodService Bill Data
Manager Input Room/FoodService Bill

<<subsystem>>
: Room/Food Services System
: Manager
: Customer
ServiceRep
9
CONSOLIDATED COLLABORATION DIAGRAM FOR MANAGEMENT SERVICES SYSTEM

Get Report Data : Hotel


: Report
Database
Report Data
Update/Get Info on Room & Rate

: Room Info on Room & Rate

Employee Update/Get
Info Employee Info
Add/Modify/Delete Info on Room & Rate

Report
Generated GenerateReport (ReportType,
ReportParameters) : Administration

Add/Modify/Delete Employee Profile

Administer User Profile


Administer Info on Room & Rate

<<user interface>> : Employee


: HMSInterface

Manager Input Display Info

: Manager

10
2.1.2 MESSAGE SEQUENCE DESCRIPTIONS FOR CONSOLIDATED COLABORATION DIAGRAMS

Message Sequence Description for Consolidated Collaboration Diagram of Reservation and Booking System

The message sequence description below addresses the messages on the Consolidated Collaboration Diagram for Reservation and Booking System.

CSR or Manager actor inputs screen selection and information to HMS Interface.
HMS Interface sends the CSR's or Manager's reservation & booking transaction inputs to Reservation.
Reservation sends a Retrieve Customer Info request along with customer's name to Customer to search for the customer record.
If the customer record is already in the system, Customer sends Customer Info to Reservation. Reservation sends Update Customer Info
request along with updated info to Customer.
If the customer record is not yet in the system, Reservation sends Create Customer Info request along with customer info to Customer to
create a customer record.
Customer sends Add/Update/Retrieve Customer Info message to HotelDatabase.
Reservation sends a Check Room Availability request along with information on room type, check-in date, check-out date to Room to search for a
vacant room.
Room sends a Retrieve Room Availability request to HotelDatabase to get room availability information.
HotelDatabase sends a Room Availability Info response to Room.
Room sends Availability Status to Reservation.
Reservation sends an Apply Discount request to Discount.
Discount sends Get Discount message to HotelDatabase to obtain discount data.
Reservation sends an Update/Retrieve Data request to HotelDatabase to update/retrieve reservation&booking data, and HotelDatabase sends
reservation&booking data to Reservation.
Reservation sends a Generate Bill, Charge Bill (or Credit Bill) request along with balance due information to Bill/Payment.

Bill/Payment sends Get Room/FoodService Bill Data message to Room/Food Services System, and Room/Food Services System sends
Room/FoodService Bill Data to Bill/Payment.

Timer sends Scheduler Events to Scheduler.


Scheduler sends a Get Reservation Data request to HotelDatabase. HotelDatabase returns Reservation Data to Scheduler.
Scheduler sends a Cancel Non-Guaranteed Reservation request to Reservation.
Scheduler sends Bill No-Show, Bill Additional Day, Bill GuaranteedReservation request to Bill/Payment.

HMS Interface sends Make Payment (or Credit Payment) message along with customer's payment information to Bill/Payment.

11
Bill/Payment sends a Payment Made (or Payment Credited) acknowledgment message to HMSInterface.
Bill/Payment sends an Update Bill/Payment request to HotelDatabase.

HMS Interface sends GenerateReport request along with ReportType, ReportParameters to Report.
Report sends Get Pending Checkout Data message to HotelDatabase.
HotelDatabase sends Pending Checkout Data to Report.
Report sends Report generated to HMSInterface.

HMSInterface sends DisplayInfo message to display information to CSR or Manager actor.

Message Sequence Description for Consolidated Collaboration Diagram of Management Services System

The message sequence description below addresses the messages on the Consolidated Collaboration Diagram for Management Services System.

Manager actor inputs screen selection and information to HMS Interface.


HMS Interface sends Administer User Profile (or Administer Info on Room & Rate) message along with the information inputs to Administration.
Administration sends a Add/Modify/Delete Employee Profile request along with employee information inputted to Employee.
Employee sends an Update/Get Employee Info request to HotelDatabase.
HotelDatabase sends an Employee Info response to Employee.

Administration sends a Add/Modify/Delete Info on Room & Rate request along with room information inputted to Room.
Room sends an Update/Get info on Room & Rate request to HotelDatabase.
HotelDatabase sends an Info on Room & Rate response to Room.

HMS Interface sends GenerateReport request along with ReportType, ReportParameters to Report.
Report sends Get Report Data message to HotelDatabase.
HotelDatabase sends Report Data to Report.
Report sends Report generated to HMSInterface.

HMSInterface sends DisplayInfo message to display information to Manager actor.

12
2.2 DISTRIBUTED SOFTWARE ARCHITECTURE DOCUMENT

2.2.1 DESCRIPTION OF HOW THE SYSTEM IS DECOMPOSED INTO COMPONENT-BASED SUBSYSTEMS &
CONCURRENT COLLABORATION DIAGRAM
As shown on the Concurrent Collaboration Diagram below, the subsystems consist of a Reservation and Booking subsystem, a Room and Food
Services subsystem, and a Management Services subsystem. These subsystems were determined through the use-case-based collaboration diagrams.
The objects in the use-case-based collaboration diagrams that communicate frequently with each other, are related to each other, and have high coupling
were placed in the same subsystem. Each of these subsystems also performs a major function, which is relatively independent of the functionality
provided by the other subsystems. These subsystems can be allocated to a separate node in the distributed environment or can be executed on the same
node as other subsystems. These three subsystems are composite subsystems because they all reside at the same location. They all have localized
autonomy. Each subsystem controls a given aspect of the system. They encapsulate the objects they contain. The communication between the three
subsystems is loosely coupled asynchronous message communication. The Hotel Management System component encompasses the three subsystems.
The Hotel Management System is also a composite system. It also encapsulates the objects it contains. All of these components are logical and physical
containers.

Concurrent Collaboration Diagram Documentation

The Hotel Management System contains three subsystems. These are Reservation and Booking, Room and Food Services, and Management
Services. The Reservation and Booking subsystem encompasses customer check in, check out, room reservation, billing for the customers' stay, and
room availability. The Room and Food Services subsystem allows the customer service representative to create the customers' food order and will
generate a bill for the order. The Management Services subsystem deals with the maintenance of the hotel services. This subsystem allows management
to add, modify, and delete information on rooms and rates and food menu items and prices. Management Services also may administer new employee
user profiles for the HMS. The managers may delete, modify, and add employee profiles. This subsystem will also generate reports on these uses.
The Hotel Management System Interface will allow the users; Managers and customer service representatives to interact with the system. The
users will be able to administer Reservation & Booking services, Room & Food services, and Management services (for management only).
The external output device, the printer, is not part of the software to be created. The computers in the hotel will have printers available. The
report on pending checkouts and the bill data generated from the Reservation & Booking subsystem will be able to be printed. The reports of all
subsystem data from the Management Services subsystem will be able to be printed. The bill generated from the Room & Food Services subsystem will
be able to be printed.

Concurrent Collaboration Diagram below

13
CONCURRENT COLLABORATION DIAGRAM
Concurrent Collaboration Diagram

<<system>>
:Hotel Management System

<<subsystem>> <<subsystem>>
:Reservation & :Room & Food
Booking Services
items added to cost

room & customer info

<<subsystem>> menu item, price


:Management
Services

reports of all subsystems' data


report pending checkout

bill data generated bill generated


HMS request
<<external output device>>
HMS data requested :Printer
<<user interface>>
:Hotel Management
System Interface

14
2.2.2 DESIGN OF RELATIONAL DESIGN DATABASE

15
2.3 SUBSYSTEM SOFTWARE ARCHITECTURE

2.3.1 OVERVIEW DESCRIPTION OF SUBSYSTEM SOFTWARE ARCHITECTURE

The Hotel Management System is functionally decomposed into the Reservations and Management subsystems. This section describes the
criteria used to determine which objects are active and which are information-hiding classes. Active objects execute concurrently and run in their
own thread. The active objects are modeled as tasks and the other objects are modeled as information hiding classes. A collaboration diagram is
given for each subsystem. The objects having the thicker, bolded borders are tasks. In the Information Hiding Classes Diagram, each class has
been given a <<stereotype>> to reflect the type of class being shown. Here are the criteria used to determine which objects in each subsystem are
active.

Keep design simple by not having too many tasks


Objects that execute concurrently can be made into tasks
Identify user interface objects
o HMS Interface
Identify device interfaces
o None, other than standard i/o (keyboard, mouse, monitor, and printer)
Identify system interfaces
o Room and Food Service System
o Reservation and Management subsystems
Identify entity objects
o See Information Hiding Classes Diagram
Identify timer objects
o Scheduler
Identify state dependent control objects
o No state dependent control objects that need to run in their own thread
Identify coordinator objects
o HotelDatabase object coordinates access to the database
Identify business logic objects
o The only business logic object in this stand-alone system is the Reservation object. This object will not be accessed concurrently, so it
does not need to run in its own thread. Each client will have its own instance of the Reservation object.
Identify algorithm objects
o No substantial algorithms used in the problem domain

16
2.3.2 TASK ARCHITECTURE
ODBC

TASK ARCHITECTURE DIAGRAM FOR RESERVATION & BOOKING SYSTEM ODBC

Get Pending CheckOut Data


: Report <<Coordinator>> : <<Access
HotelDatabase
DB>> : HotelDatabase

Pending CheckOutData
Get Discount

: Discount
Update / Retrieve Room Availability
Room Availability Info
: Room

Data returned
Availability
Apply Update/Retrieve data
Status CheckRoomAvailability (Type, Dates)
Discount Set Room Availability
Update/Retrieve Customer Info Update Bill/Payment
Customer Info

Create/Update/Retrieve Customer Info Get Reservation Data


: Reservation : Customer
Customer Info Reservation Data returned
GenerateReport (PendingCheckOutRpt,
Report Generated
ReportParameters) Cancel Non-Guaranteed
Reservation
<<Periodic>> : Scheduler Timer Events <<External Timer>> : DigitalClock
Generate Bill
Charge Bill
CreditBill
Reservation Info
Bill No-Show
Bill Additional Day
Create/Retrieve/Update Reservation, CheckIn, CheckOut (Trans Data) Bill GuaranteedReservation

Make Payment, Credit Payment


<<Subsystem>> : FoodService
<<User Interface>> : HMSInterface : Bill/Payment

Payment made, Payment credited

Display Info Manager Input


Generate Bill
CSR Input
Display Info
Bill Data returned
17

: Customer : Manager
ServiceRep
ODBC

TASK ARCHITECTURE DIAGRAM FOR MANAGEMENT SERVICES SYSTEM


ODBC

Get Report Data


<<Coordinator>> : HotelDatabase <<Access DB>> : HotelDatabase
: Report

Report Data
Update/Get Info on Room & Rate

Info on Room & Rate


: Room
Employee Update/Get
Info Employee Info
Add/Modify/Delete Info on Room & Rate

Report
GenerateReport (ReportType,
Generated
ReportParameters)
: Administration
Add/Modify/Delete Employee Profile

Administer User Profile


Administer Menu Item & Price
Administer Info on Room & Rate
: Employee
<<User Interface>> : HMSInterface

Manager Input Display Info

: Manager

18
2.4 INFORMATION HIDING CLASSES

19
<<entity>> <<User Interface>> <<Coordinator>> <<entity>>
Customer HMS Interface Database Administration
customerID : int = 0 customerID : int = 0 sqlString : string = "" employeeID : int = 0
lastName : string = "" lastName : string = "" itemID : int = 0
middleName : string = "" firstName : string = "" update() roomNumber : int = 0
address : string = "" middleName : string = "" retrieve()
city : string = "" discountType : string = "" createConnection() administerUserProfile()
state : string = "" discountAmount : int = 0 close() administerFoodService()
zip : string = "" confirmationNumber : int = 0 administerHotelSystem()
firstName : string = "" reservationID : int = 0 <<entity>>
confirmationNumber : int = 0 roomNumber : int = 0 Employee <<control>>
foodItems : Vector = 0 Scheduler
employeeID : int = 0
createCustomer() foodAmounts : Vector = 0
userID : string = "" customerID : int = 0
modifyCustomer() discountType : string = ""
password : string = "" reservationID : int = 0
deleteCustomer() discountAmount : int = ""
roomRate : int = 0
login() chargeRoom : boolean = False
<<entity>> doCheckin()
timeChargeForNoShow : string = ""
Discount doCheckout()
timeChargeForAdditionalDay : string = ""
createReservation() <<entity>>
customerID : int = 0 timeChargeForGuaranteedRoom : string = ""
modifyReservation() Report
reservationID : int = 0
deleteReservation() reportType : string = ""
discountType : string = "" cancelNonGuarRes()
applyDiscount()
discountAmount : int = 0 billGuarRoom()
removeDiscount() generateReport() billAddtlDay()
createOrder()
applyDiscount() billNoShows()
modifyOrder() <<entity>>
removeDiscount()
deleteOrder() Room
applyDiscount() <<entity>>
<<entity>> roomNumber : int = 0 HMS
removeDiscount()
Reservation roomStatus : string = "" employeeID : int = 0
reservationID : int = 0 employeeLogInStatus : boolean = false
customerID : int = 0 <<entity>> changeRoomStatus() userID : string = ""
roomNumber : int = 0 Bill/Payment password : string = ""
roomAvailStatus : string = "" customerID : int = 0
roomStatus : string = "" reservationID : int = 0 login()
paymentAmount : int = 0 logout()
createReservation() creditAmount : int = 0
modifyReservation()
deleteReservation() makePayment()
checkRoomAvailability() generateBill()
doCheckout() chargeBill()
generateBill() creditBill()
assignRoom() creditPayment()
doCheckin()

20
21

You might also like