UML教材1Hotel Case文档.docx

上传人:b****3 文档编号:4473769 上传时间:2022-12-01 格式:DOCX 页数:19 大小:316.65KB
下载 相关 举报
UML教材1Hotel Case文档.docx_第1页
第1页 / 共19页
UML教材1Hotel Case文档.docx_第2页
第2页 / 共19页
UML教材1Hotel Case文档.docx_第3页
第3页 / 共19页
UML教材1Hotel Case文档.docx_第4页
第4页 / 共19页
UML教材1Hotel Case文档.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

UML教材1Hotel Case文档.docx

《UML教材1Hotel Case文档.docx》由会员分享,可在线阅读,更多相关《UML教材1Hotel Case文档.docx(19页珍藏版)》请在冰豆网上搜索。

UML教材1Hotel Case文档.docx

UML教材1HotelCase文档

GiantForestInnSystem

 

StepsinObject-OrientedSystemsAnalysis:

1.Identifythebusinesseventsandmakeaneventtable(Chapter3)

2.Identifytheusecasesandproduceausecasediagramforthesystem(Chapter4)

3.Writeausecasenarrativedescribingthesystem’sresponsetoeachbusinessevent(Chapter4)

4.Drawasystemsequencediagramforeachusecasescenario(Chapter4)

5.Produceadomainmodelshowingtheconcepts,attributes,andassociationsintheproblemdomainofthesystem(Chapter5)

6.Writeacontractforeachsystemoperation(Chapter5)

1.Identifythebusinesseventsandmakeaneventtable(Chapter3)

A.Listofbusinessevents:

∙Guestreservesroom–externalevent

∙Guestregisters–externalevent

∙Guestincurschargeforservice–externalevent

∙Guestaddstiptobillforservicecharge–externalevent

∙Hotelproducesfinalbill–temporalevent

∙Guestpaysbill–externalevent

∙Guestchecksout–externalevent

B.EventTable:

EventTablefortheGiantForestInnGuestSystem

Event

Number

EventDescription

SystemInput

ActorProvidingInput

SystemOutput

Actor

Receiving

Output

1.

Guestreservesroom

Reservation

Request

Guest

Confirmation

Authorization

Request

Guest

CreditAuthorization

System

2.

Guestregisters

Registration

Request

Guest

Room

Assignment

Guest

3.

Guestincurschargeforservice

Service

Request

Employee

Service

Charge

Receipt

Guest

4.

Guestaddstiptobillforservicecharge

Tip

Guest

5.

Timetoproducefinalbill

Bill

Guest

6.

Guestpaysbill

Payment

Guest

Authorization

Request

Receipt

CreditAuthorization

System

Guest

7.

Guestchecksout

CheckOut

Request

Guest

2.Identifytheusecasesandproduceausecasediagramforthehotelsystem

(Chapter4)

A.Listofusecases:

∙ReserveRoom

∙RegisterGuest

∙ChargeService

∙AddTiptoServiceCharge

∙ProduceFinalBill

∙PaysBill

∙CheckOutGuest

B.ListofActors:

(i)Guest–initiatingandparticipating

(ii)Employee–initiating

(iii)CreditAuthorizationSystem–participating

C.UseCaseDiagram:

3.Writeausecasenarrativedescribingthehotelsystem'sresponsetoeachbusinessevent(Chapter4)

Usecase:

ReserveRoom

Actors:

Guest

Purpose:

Tomakearoomreservation.

Overview:

Guestsubmitsareservationrequest.Astheguestmayselectaspecificroom,thisisincludedintherequest.Iftheguesthasnopreference,thesystemselectsaroombasedonthetypeandpriceofaccommodationrequired.Ifaroomisavailable,guestisthenaskedforacreditcardtoreservetheroom.Thesystemthensendsanauthorizationrequesttothecreditcardauthorizationsystem.Whenapproved,aconfirmationissenttotheguestandtheroomisreserved.

Type:

Essential

Preconditions:

Roomavailabilitymustbeknowntothesystem.

Guestmusthaveavalidcreditcard.

Postconditions:

Reservationwasrecordedinthesystem.

SpecialRequirements:

Guestmustgetasystemresponsewithinfiveseconds.

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenaguestsubmitsareservation.

2.Guestentersaphonenumber.

3.Looksuptheguestrecord.

4.[newguest]Guestentersnameandaddress.

5.Savestheguest.

6.[roompreferenceknown]Guestentersroomidentifierfollowedbyarrivaldate,numberofnights,andnumberofoccupants.

7.Informstheguesttheroomisavailable.

8.[roompreferencenotknown]Guestenterstypeofroomandviewdesiredfollowedbyarrivaldate,numberofnights,andnumberofoccupants.

9.Informstheguestaroomisavailable.

10.Guestenterscreditcardnumber,expirationmonth,andexpirationyear.

11.Sendsthecreditcardnumber,informationandmerchantnumbertothecreditauthorizationsystem.Whenanauthorizationnumberisreceived,itproducesaconfirmationandreservestheroom.

12.Guestreceivestheirconfirmation.

AlternativeFlowofEvents

Line3:

Ifguestalreadyinthesystem,gotostep6.

Line7.Ifroomnotavailable,systeminformsguestandgoestostep8.

Line9.Ifroomnotavailable,systeminformsguestandreturnstostep8.

Line11:

Ifcreditcardisnotauthorized,systeminformsguestandterminates.

Usecase:

RegisterGuest

Actors:

Guest

Purpose:

Tocheckintoinn.

Overview:

Guestsubmitsaconfirmationnumber.Iftheguesthasnoconfirmationnumber,theguestreservesaroomfirst.Theguestisthengivenaroomassignment.

Type:

Essential

Preconditions:

Reservationconfirmationmustbeknowntothesystem.

Postconditions:

Registrationwasrecordedinthesystem.

SpecialRequirements:

Guestmustgetasystemresponsewithin15seconds.

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenguestarrivesatfrontdesk.

2.Guestentersconfirmationnumber.

3.Looksuptheguestreservationandrecordsthearrivaltime.Theguestisgivenaroomassignment.

4.Guestreceivesaroomassignment.

AlternativeFlowofEvents

Line2:

Ifguestdoesnothaveareservation,executetheReserveRoomusecasefirst.

Usecase:

ChargeService

Actors:

Employee

Purpose:

Torecordchargesincurredbyguests.

Overview:

Whenaguesthasreceivedaservicefromtheinn,theemployeesubmitsarecordoftheserviceforlaterbilling.

Type:

Essential

Preconditions:

Guestmustbecheckedintoinn.

Postconditions:

Servicechargewasrecordedinthesystem.

SpecialRequirements:

None

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenaguestincursaservicecharge.

2.Employeeentersroomidentifier,servicetime,servicedescription,andserviceprice.

3.Recordstheservicechargeandproducesaservicechargereceipt.

4.Theguestreceivesaservicechargereceipt.

AlternativeFlowofEvents

None

Usecase:

AddTiptoServiceCharge

Actors:

Guest

Purpose:

Toallowguesttotipemployeesforgoodservice.

Overview:

Aftertheguestincursaservicecharge,theyarepresentedwithaservicechargereceipt.Whenconvenienttheguestwritesinatipamount.Thistipamountisaddedtotheservicecharge.

Type:

Essential

Preconditions:

Guestmusthaveaservicechargereceipt.

Postconditions:

Updatedservicechargewasrecordedinthesystem.

SpecialRequirements:

None

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenaguestwishestoaddatiptoaservicecharge.

2.Guestentersroomidentifier,servicetime,servicenumber,andtipamount.

3.Addsthetiptotheservicecharge.

AlternativeFlowofEvents

None.

Usecase:

PayBill

Actors:

Guest

Purpose:

Toacceptthreedifferentkindsofpayment.

Overview:

Guestmaypaybycash,check,orcreditcard.Ifpaymentiscashorcheck,areceiptissenttotheguest.Ifpaymentisacreditcard,thesystemthensendsanauthorizationrequesttothecreditcardauthorizationsystem.Whenapproved,areceiptissenttotheguest.

Type:

Essential

Preconditions:

Finalbillmusthavedeliveredtotheguest.

Postconditions:

Paymentwasrecordedinthesystem.

SpecialRequirements:

None

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenaguestisreadytopaybill.

Chooseone:

2.[cashpayment]Roomidentifierandamountisentered.

3.Recordsthepaymentandproducesareceipt.

4.[checkpayment]Roomidentifier,amount,andchecknumberisentered.

5.Recordsthepaymentandproducesareceipt.

6.[creditcardpayment]Roomidentifier,amount,creditcardnumber,expirationmonth,andexpirationyearisentered.

7.Sendsthecreditcardnumber,expirationmonth,expirationyear,amount,andmerchantnumbertothecreditcardauthorizationsystem.Whenanauthorizationnumberisreceived,recordsthepaymentandproducesareceipt.

8.Guestreceivestheirreceipt.

AlternativeFlowofEvents

Line7:

Ifcreditcardisnotauthorized,systeminformsguestandanothermethodofpaymentisused.

Usecase:

CheckOutGuest

Actors:

Guest

Purpose:

Tocheckoutfrominn.

Overview:

Afterguesthaspaidtheirbill,theyinformtheinnwhentheyactuallycheckout.Thealsoreturntheirroomkeyatthistime.

Type:

Essential

Preconditions:

Billmusthavebeenpaid.

Postconditions:

Timeofcheckoutwassavedinthesystem.

SpecialRequirements:

None

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenguestarrivesatfrontdesktocheckout.

2.Guestentersroomidentifier.

3.Looksuptheguestrecordsandrecordsthedeparturetime.

6.Guestdeparts.

AlternativeFlowofEvents

Line3:

Ifguesthasnotpaidtheirbill,executethePayBillusecasefirst.

4.Drawasystemsequencediagramforeachoftheusecasesinthehotelsystem.(Chapter4)

Step5.Produceadomainmodelshowingtheconcepts,attributes,andassociationsintheproblemdomainofthesystem.

Therearemanywaystomodelthereservationofaroomforaparticulardate.WehavechosentocreateaconceptcalledanAccommodation.Thisisanassociationconceptbetweenreservationandroom.Tocheckifaroomisavailable,oneneedsonlytolookforinstancesofAccommodationsforthedatesrequested.Iftheinstancesdonotexist,theroomsareavailable.

Thisdomainmodelcontainsageneralization-specializationhierarchyofPaymentconcepts,whichwillbefamiliartomostallstudents.WehavealsoincludedspecificationconceptsforServiceChargeandRoom.

Theidentificationofattributesisusuallynotdifficult.Aproblemistheuseofdatesandtimes.Sincemostprogramminglanguagesdonotdistinguishbetweenthem,itisnotacriticalissue.

Theassociati

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1