欢迎来到天天文库
浏览记录
ID:59489397
大小:414.50 KB
页数:15页
时间:2020-11-03
《自动售货机-需求报告.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、VendingMachine1-ObjectivesTheobjectivesofthisexerciseareto:·BasedonTOODdesignapproach,propose2solutionsforthedesignarchitectureoftheVendingMachinepresentedinspecificationmodule:·Firstsolution:sequential-withoutprocess.Usingasequentialsolution,itisinterestingtoshowthanonemodeofth
2、eStateTransitionDiagram(STD)cannotbereached:“DispensingProduct”.·Secondsolution:concurrent-withprocess(es).Hypothesismustbemadeonthehardware.2-ProblemOverviewThisexampleisanextensionoftheproblempresentedattheForum”StructuredDevelopment”inSanFrancisco,inFebruary1986.Theproblemsta
3、tementandtheresultingmodelswereinteractivelydevelopedanddescribedasadialoguebetweenthecustomerandtheanalyst.Thecustomerstartedbyoutliningtotheanalystthatheisfacedwithcrooksascustomerswhotryputtingjunkintothecoinslotsofhisvendingmachineshopingtogetsomethingfornothing.Someeventryt
4、oentercoin-likeslugstofoolthemachines.Theyalsotrytovandalizetheselectionregistertogetproductsfree.Thesearemajorproblemsforthevendingmachineoperatorsbecausetheydobusinessonanarrowmargin,whichdisappearsveryquickly.Themachineistodothefollowing:-Acceptobjectsfromthecustomerinpayment
5、forhis/herpurchase.-Checkeachobjecttomakesurethatitisnotaslug.Thisistobedonebyvalidatingthesize,weightandthickness.-Acceptnickels,dimesandquarters.Anyothercoinsaretobetreatedasslugsandreturnedtothecustomer.-Onlyinitiatepaymentcomputationorproductselectionprocessafteravalidatedco
6、inisdetected.-Acceptproductselectionfromthecustomer.-Checktoseewhethertheselectedproductisavailable,ifnotavailable,returncoinsautomaticallyandnotifycustomer.-Acceptavarietyofproducts,whichwillchangefromtimetotime.Hence,theproductpricesshouldbechangeable.-Returnthecustomer’spayme
7、ntonrequestifheorshedecidesnottomakeaselection.-Dispensetheproducttothecustomerifitisavailableandtheamountissufficient.-Returnthecorrectchangetothecustomeriftheamountdepositisgreaterthantheproductprice(initialconditions?).-Disabletheproductselectionaftertheproductisdispensedandu
8、ntilthenextvalidatedcoinisreceived.Severalextra
此文档下载收益归作者所有