UML教材1Car Case文档Word下载.docx

上传人:b****6 文档编号:21137106 上传时间:2023-01-27 格式:DOCX 页数:18 大小:401.57KB
下载 相关 举报
UML教材1Car Case文档Word下载.docx_第1页
第1页 / 共18页
UML教材1Car Case文档Word下载.docx_第2页
第2页 / 共18页
UML教材1Car Case文档Word下载.docx_第3页
第3页 / 共18页
UML教材1Car Case文档Word下载.docx_第4页
第4页 / 共18页
UML教材1Car Case文档Word下载.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

UML教材1Car Case文档Word下载.docx

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

UML教材1Car Case文档Word下载.docx

NotethatthisanswerisattheendofChapter4exceptthattheevent“CompanyCreatesbill”isomittedhere.Thesolutionpresentedinthisinstructor’sguideassumesthatthebilliscreatedasanoutputtotheevent“CompanyInspectsCar.”

B.EventTable:

EventTablefortheApacheRentACarRentalSystem

Event

Number

EventDescription

System

Input

ActorProviding

Output

Actor

Receiving

1.

Customerreservesacar

Reservation

Request

Customer

Confirmation

Authorization

Payment

authorizationsystem

2.

Customerrentsacar

RentalRequest

MileageOut

Employee

RentalAgreement

3.

Customerreturnsacar

ReturnRequest

4.

Companyinspectscar

Inspection

Bill

ThirdParty

5.

Customerpaysbill

Receipt

2.Identifytheusecasesandproduceausecasediagramforthesystem

(Chapter4)

A.Listofusecases:

∙ReserveCar

∙RentCar

∙ReturnCar

∙InspectCar

∙PayBill

B.ListofActors:

(i)Customer–initiatingandparticipating

(ii)Employee–initiating

(iii)CreditAuthorizationSystem–participating

(iv)ThirdPartyCustomer–participating

C.UseCaseDiagram:

3.Writeausecasenarrativedescribingthesystem'

sresponsetoeachbusinessevent(Chapter4)

Usecase:

ReserveCar

Actors:

Purpose:

Tomakeacarrentalreservation.

Overview:

Customersubmitsareservationrequest.Ifacartypeisavailable,customeristhenaskedforacreditcardtoreservethecar.Thesystemthensendsanauthorizationrequesttothecreditcardauthorizationsystem.Whenapproved,aconfirmationissenttothecustomer.

Type:

Essential

Preconditions:

Carspecificationsmustbeknowntothesystem.

Customermusthaveavalidcreditcard.

Postconditions:

Reservationwassavedinthesystem.

SpecialRequirements:

Customermustgetasystemresponsewithin5seconds.

FlowofEvents

ActorAction

SystemResponse

1.Thisusecasebeginswhenacustomersubmitsareservation.

2.Customerenterscartype,pickupdate,andreturndate.

3.Savesthereservation.

4.Customerentershisorherphonenumber,name,andaddress.

5.Savesthecustomerrecord.

6.Customerenterscreditcardnumber,expirationmonth,andexpirationyear.

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

8.Customerreceivesaconfirmation.

AlternativeFlowofEvents

Line3.Ifcartypeisnotavailable,systeminformscustomerandreturnstoStep2.

Line7:

Ifcreditcardisnotauthorized,systeminformscustomerandterminatesthereservationrequest.

RentCar

Customer,Employee

Torecordarentalagreement.

Customersubmitsarentalrequest.Theemployeeentersthemileageout.Thesystemthenrecordsalltheauthorizeddriversandextrachargesthecustomerhasagreedto.Lastlythesystemproducesarentalagreement.

Areservationmusthavebeencompleted.

Rentalagreementwassavedinthesystem.Producesarentalagreement.

Customermustgetasystemresponsewithin15seconds.

1.Thisusecasebeginswhenacustomerarrivestopickuprentalcar.

2.[customerdoesnothaveareservation]ExecutetheReservesCarusecase.

3.Customerentersconfirmationnumberandtimeout.

4.Requeststhemileageoutfromanemployee.Whenamileageoutisreceived,therentalcontractissaved.

5.Customerentersname,birthdate,driver’slicensenumber,andstateofissueforeachdriver.

6.Addsdriverstotherentalagreement.

7.[customerisusingathird-partypayer]Customerentersaccountnumberofthirdpartythatwillpaytherentalcharges.

8.Addsaccountnumbertotherentalagreement.

9.Customerentersextrachargestobepaid(collisiondamagewaiver,liabilityinsurance,personalaccidentinsurance).

10.Addstheextrachargestotherentalagreement.Producesarentalagreement.

11.Customerreceivesarentalagreement.

Line7.Ifaccountnumberisinvalidinformthecustomer,andreturntoStep9.

ReturnCar

Torecordthetimethecarwasreturned.

Afterthecustomerreturnstherentalcar,thetimeisrecordedsothecustomerincursnomorecharges.

Customermusthaverentedacar.

Thesystemrecordsthetimereturned.

None

1.Thisusecasebeginswhenacustomerreturnsarentalcar.

2.Customerenterslicensenumberandtimein.

3.Recordsthetimethecarwasreturned.

InspectCar

Torecordthemileageinandverifythatcarwasreturnedwithafulltankofgaswithoutdamage.

Afterthecustomerreturnstherentalcar,anemployeeinspectsthecarforgasanddamage.Theyalsorecordthemileageinforuseincreatingabill.Thebillisthenpresentedtothecustomer.

Customermusthavereturnedcar.

Thecustomerbillisproduced.

1.Thisusecasebeginsafteracustomerhasreturnedarentalcar.

2.Employeeenterslicensenumber,damage,gaslevel,andmileagein.

3.Recordsthedamage,gaslevel,andmileagein.Computestheextrachargesforgas,excessmileage,damage,andproducesabill.

4.Customerreceivesabill.

.

None.

PayBill

Tomakeapaymentforcarrental.

Customermaypayonlybycreditcard.Thesystemthensendsanauthorizationrequesttothecreditcardauthorizationsystem.Whenapproved,areceiptissenttothecustomer.

Finalbillmusthavebeenpresentedtothecustomer.

Paymentwassavedinthesystem.

1.Thisusecasebeginswhenacustomerisreadytopaybill.

2.Thecustomerenterslicensenumber,amountpaid,creditcardnumber,expirationmonth,andexpirationyear.

3.Sendsthecreditcardnumber,expirationmonth,expirationyear,amount,andmerchantnumbertothecreditcardauthorizationsystem.Whenanauthorizationnumberisreceived,thepaymentisrecorded.Arentalreceiptisproduced.

4.Customerreceivestherentalreceipt.

Line3:

Ifcreditcardisnotauthorized,systeminformscustomerandreturntoStep2.

4.Drawasystemsequencediagramforeachoftheusecasesinthecarrentalsystem.(Chapter4)

Step5.Produceadomainmodelshowingtheconcepts,attributes,andassociationsintheproblemdomainofthesystem.

ApacheRentACarDomainModel

NotethatReservationisnotassociatedwithcarasitdoesnotspecifyaparticularcar.Itonlyguaranteesaprice,thusitisassociatedwithaRateClassconcept.Thecarisassignedduringtherental.TheRentalisthecenterofattentioninthisdomainmodel.Almosteveryconceptassociateswithit.AswellastheThirdPartyCustomer,therentalhasextracharges,drivers,inspection,return,andpayment.

Twospecificationconceptsareused.TheyaretheRateClass,whichdescribestheCar,andtheExtraChargeSpecificationthatdescribestheExtraCharge.

Thereisoneinheritance,whichissimpletocomprehend.Boththerentalcustomerandthethirdpartycustomerhaveaphonenumber,name,andaddress.Thustheseattributesareobviouscandidatesforinheritance.

Thecreditcardisusedduringthereservationforguaranteepurposesandlastlyforthepaymentwhenthecarhasbeenreturnedandinspected.Wehaveassumedduringrentalthecreditcardisthesameoneusedforthereservationsoitisnotrecordedthen.Thisisacriticalassumptionthatshouldbemadeclearduringtheassignment.

Recallitisbesttonotallowcashorcheckpayments.

Theidentificationofattributesisusuallynotdifficult.Aproblemisdistinguishingtheuseofdatesandtimes.Asmostprogramminglanguagesdonotdistinguishbetweenthem,itisnotacriticalissue.

Theassociationnamesareneverusedindesign;

buttheyareusedtomaketherequirementseasiertounderstand,especiallythecontracts.

Themultiplicitiesarealsonotcriticalatthistimebutalsomake

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

当前位置:首页 > 工程科技 > 材料科学

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

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