Upload
independent
View
1
Download
0
Embed Size (px)
Citation preview
Hotel Management System
ANALYSIS AND DESIGN MODELS
prepared by Team 1
Sandra BusikSusan Le
Peter LockwoodPradeep MiglaniReita Sikka Kai Zhang
1
TABLE OF CONTENTS1 ANALYSIS MODEL.......................................................................................................31.1 STATIC MODEL......................................................................................................31.2 ATTRIBUTES OF THE CLASSES ON THE STATIC MODEL.....................................................................41.3 STATE CHARTS......................................................................................................51.4 COLLABORATION DIAGRAMS (ONE FOR EACH USE CASE) & MESSAGE SEQUENCE DESCRIPTIONS........................................8
2 DESIGN MODEL.........................................................................................................82.1 CONSOLIDATED COLLABORATION DIAGRAMS & MESSAGE SEQUENCE DESCRIPTIONS...............................................8
2.1.1 CONSOLIDATED COLLABORATION DIAGRAMS......................................................................................................................................................................................... 92.1.2 MESSAGE SEQUENCE DESCRIPTIONS FOR CONSOLIDATED COLABORATION DIAGRAMS..................................................................................................................11
2.2 DISTRIBUTED SOFTWARE ARCHITECTURE DOCUMENT.......................................................................132.2.1 DESCRIPTION OF HOW THE SYSTEM IS DECOMPOSED INTO COMPONENT-BASED SUBSYSTEMS & CONCURRENT COLLABORATION DIAGRAM..........................132.2.2 DESIGN OF RELATIONAL DESIGN DATABASE.......................................................................................................................................................................................... 15
2.3 SUBSYSTEM SOFTWARE ARCHITECTURE..................................................................................162.3.1 OVERVIEW DESCRIPTION OF SUBSYSTEM SOFTWARE ARCHITECTURE................................................................................................................................................. 162.3.2 TASK ARCHITECTURE................................................................................................................................................................................................................................ 17
2.4 INFORMATION HIDING CLASSES.......................................................................................19
2
1 ANALYSIS MODEL
1.1 STATIC MODEL
Custom er
HM S Interface
Adm inistration
Em ployee
Discount
Bill/Paym ent
Report
Scheduler
HM S
Reservation
Room
processes
updates
creates/m odifies/deletesprocesses
has
processes
processes
generates
processes
com pletes
bills cancels
3
1.2 ATTRIBUTES OF THE CLASSES ON THE STATIC MODEL
Custom ercustom erIDlastNam em iddleNam eaddresscitystatezipfirstNam econfirm ationNum ber
HM S Interfacecustom erIDlastNam efirstNam em iddleNam ediscountTypediscountAm ountconfirm ationNum berreservationIDroom Num berfoodItem sfoodAm ountsdiscountTypediscountAm ount
Discountcustom erIDreservationIDdiscountTypediscountAm ount
Bill/Paym entcustom erIDreservationIDpaym entAm ountcreditAm ountReport
reportType
Schedulercustom erIDreservationIDroom RatechargeRoomtim eChargeForNoShowtim eChargeForAdditionalDaytim eChargeForGuaranteedRoom
HM Sem ployeeIDem ployeeLogInStatususerIDpassword
Adm inistrationem ployeeIDitem IDroom Num berEm ployee
em ployeeIDuserIDpassword
ReservationreservationIDcustom erIDroom Num berroom AvailStatusroom Status
Roomroom Num berroom Status
M enum enuItem
DatabasesqlString
5
1.3 STATE CHARTS
Bill/Payment Statechart
Recieve & add item
Generate BillAdjust Bill
Record Payment
Open
Generated
7
Room State Chart
Vacant
ReservedOccupiedRoom number entered when customer check in
Rm No entered when customer checks in
Five hrs. past check in
Customer check out
Rm. no. entered
RROOMoom Statechart
8
Scheduler Running
Retrieve Tim e
Billing Additional DayTim e is 1:00 p.m .
Billing Guaranteed Reservations
Tim e is 6:30 p.m .
Cancelling Non-guaranteed Reservations
Tim e is 6:00 p.m .
Billing Com plete
Billing Com pleteReservations Canceled
System Started
System Stopped
Scheduler Statechart
9
1.4 COLLABORATION DIAGRAMS (one for each use case) & MESSAGE SEQUENCE DESCRIPTIONSWe have done individual collaboration diagrams (one for each use case). Per Dr. Wu, they are notrequired 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 MODEL2.1 CONSOLIDATED COLLABORATION DIAGRAMS & MESSAGE SEQUENCE DESCRIPTIONS
10
2.1.1 CONSOLIDATED COLLABORATION DIAGRAMS
: Reservation
: Bill/Paym ent
: Report
: Scheduler
: Custom er
: HotelDatabase
: <<External Tim er>> D igital Clock
: Room
: Discount
: Custom erServiceRep
: HM SInterface<<user interface>>
CONSOLIDATED COLLABORATION DIAGRAM FOR RESERVATION & BOOKING SYSTEM
: M anager : Room /Food Services System
<<subsystem >>
D ata returned
U pdate/Retrieve dataApply Discount
Create/Update/R etrieve Custom er Info
C ustom er Info
Availability Status C heckRoom Availability (Type, D ates)
Set Room Availability
Generate BillCharge BillCredit Bill
Update Bill/Paym ent D ata
G et Room /FoodService Bill DataRoom /FoodService Bill
Get Pending CheckO ut Data
Pending CheckO utData returned
Cancel N on-Guaranteed reservation
Get Reservation D ataR eservation Data returned
Bill No-ShowBill Additional Day
Bill Guaranteed R eservation
Update/Retrieve C ustom er InfoC ustom er Info
Scheduler Events
Update / Retrieve Room Availability Info
Room Availability Info
Get Discount
Make Paym ent, Credit Paym ent
Paym ent m ade, Paym ent credited
Create/Retrieve/U pdate Reservation, CheckIn, CheckO ut (Trans Data)
R eservation Info
GenerateR eport (PendingC heckOutRpt, ReportParam eters)
R eport Generated
CSR InputDisplay Info
M anager Input
Display Info
11
: HMSInterface<<user interface>>
: Manager
: Report
: Adm inistration
: HotelDatabase
: Em ployee
: Room
CONSOLIDATED CO LLABORATIO N DIAG RAM FOR M ANAGEM ENT SERVICES SYSTEM
G enerateReport (ReportType, ReportParam eters)
Report G enerated
Adm inister User ProfileAdm inister Info on Room & Rate
M anager Input Display Info
G et Report Data
Report Data
Add/M odify/Delete Info on Room & Rate
Add/M odify/Delete Em ployee Profile
Update/G et Em ployee Info
Em ployee Info
Update/G et Info on Room & Rate
Info on Room & Rate
12
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.
13
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.
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.
14
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 toEmployee.
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.
15
2.2 DISTRIBUTED SOFTWARE ARCHITECTURE DOCUMENT
2.2.1 DESCRIPTION OF HOW THE SYSTEM IS DECOMPOSED INTO COMPONENT-BASED SUBSYSTEMS & CONCURRENT COLLABORATION DIAGRAMAs 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. Thesesubsystems 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 subsystemsbecause 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
16
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
17
:Room & Food Services
<<subsystem >>:Reservation &
Booking
<<subsystem >>
:M anagem ent Services
<<subsystem >>
:Hotel M anagem ent System<<system >>
:Printer<<external output device>>
:Hotel M anagem ent System Interface
<<user interface>>
Concurrent Collaboration Diagram
m enu item , price
bill generated
room & custom er info
item s added to cost
report pending checkout
bill data generated
reports of all subsystem s' data
HM S data requestedHM S request
CONCURRENT COLLABORATION DIAGRAM
18
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 beengiven 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 Systemo Reservation and Management subsystems
Identify entity objectso See Information Hiding Classes Diagram
Identify timer objectso Scheduler
Identify state dependent control objectso No state dependent control objects that need to run in their own thread
Identify coordinator objects
20
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. Thisobject 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 objectso No substantial algorithms used in the problem domain
2.3.2 TASK ARCHITECTURE
: Reservation
: Bill/Payment
: Report
<<Periodic>> : Scheduler
: Customer
: Room
: Discount
: Customer ServiceRep<<User Interface>> : HMSInterface
TASK ARCHITECTURE DIAGRAM FOR RESERVATION & BOOKING SYSTEM
: Manager
Generate BillCharge BillCreditBill
Data returned
Update/Retrieve dataApply Discount
Create/Update/Retrieve Customer Info
Customer Info
CheckRoomAvailability (Type, Dates)Set Room Availability
Availability Status
Update Bill/Payment
Get Pending CheckOut Data
Pending CheckOutData
Bill No-ShowBill Additional Day
Bill GuaranteedReservation
Cancel Non-Guaranteed Reservation
Get Reservation Data
Reservation Data returned
Update/Retrieve Customer InfoCustomer Info
Timer Events
Update / Retrieve Room Availability Room Availability Info
Get Discount
Make Payment, Credit PaymentPayment made, Payment credited
Create/Retrieve/Update Reservation, CheckIn, CheckOut (Trans Data)
Reservation Info
GenerateReport (PendingCheckOutRpt, ReportParameters)
Report Generated
CSR Input Display Info Manager InputDisplay Info
<<External Timer>> : DigitalClock
<<Subsystem>> : FoodServiceGenerate BillBill Data returned
<<Access DB>> : HotelDatabase
ODBC
ODBC
<<Coordinator>> : HotelDatabase
21
: Manager
: Report
: Administration
: Room
TASK ARCHITECTURE DIAGRAM FOR MANAGEMENT SERVICES SYSTEM
Administer User ProfileAdminister Menu Item & PriceAdminister Info on Room & Rate
GenerateReport (ReportType, ReportParameters)
Report Generated
Manager Input Display Info
Get Report Data
Report Data
Add/Modify/Delete Info on Room & Rate
Add/Modify/Delete Employee Profile
Update/Get Info on Room & Rate
Info on Room & Rate
: Employee
Update/Get Employee Info
Employee Info
<<Coordinator>> : HotelDatabase
<<User Interface>> : HMSInterface
<<Access DB>> : HotelDatabase
ODBC
ODBC
22
Custom ercustom erID : int = 0lastNam e : string = ""m iddleNam e : string = ""address : string = ""city : string = ""state : string = ""zip : string = ""firstNam e : string = ""confirm ationNum ber : int = 0
createCustom er()m odifyCustom er()deleteCustom er()
<<entity>>HM S Interface
custom erID : int = 0lastNam e : string = ""firstNam e : string = ""m iddleNam e : string = ""discountType : string = ""discountAm ount : int = 0confirm ationNum ber : int = 0reservationID : int = 0room Num ber : int = 0foodItem s : Vector = 0foodAm ounts : Vector = 0discountType : string = ""discountAm ount : int = ""
doCheckin()doCheckout()createReservation()m odifyReservation()deleteReservation()applyDiscount()rem oveDiscount()createOrder()m odifyOrder()deleteOrder()applyDiscount()rem oveDiscount()
<<User Interface>>
Discountcustom erID : int = 0reservationID : int = 0discountType : string = ""discountAm ount : int = 0
applyDiscount()rem oveDiscount()
<<entity>>
Bill/Paym entcustom erID : int = 0reservationID : int = 0paym entAm ount : int = 0creditAm ount : int = 0
m akePaym ent()generateBill()chargeBill()creditBill()creditPaym ent()
<<entity>>
ReportreportType : string = ""
generateReport()
<<entity>>
Schedulercustom erID : int = 0reservationID : int = 0room Rate : int = 0chargeRoom : boolean = Falsetim eChargeForNoShow : string = ""tim eChargeForAdditionalDay : string = ""tim eChargeForGuaranteedRoom : string = ""
cancelNonGuarRes()billGuarRoom ()billAddtlDay()billNoShows()
<<control>>
HM Sem ployeeID : int = 0em ployeeLogInStatus : boolean = falseuserID : string = ""password : string = ""
login()logout()
<<entity>>
Adm inistrationem ployeeID : int = 0item ID : int = 0room Num ber : int = 0
adm inisterUserProfile()adm inisterFoodService()adm inisterHotelSystem ()
<<entity>>
Em ployeeem ployeeID : int = 0userID : string = ""password : string = ""
login()
<<entity>>
ReservationreservationID : int = 0custom erID : int = 0room Num ber : int = 0room AvailStatus : string = ""room Status : string = ""
createReservation()m odifyReservation()deleteReservation()checkRoom Availability()doCheckout()generateBill()assignRoom ()doCheckin()
<<entity>>Room
room Num ber : int = 0room Status : string = ""
changeRoom Status()
<<entity>>
DatabasesqlString : string = ""
update()retrieve()createConnection()close()
<<Coordinator>>
24