面向对象软件工程(使用UML-模式与Java)全套课后习题答案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Object-OrientedSoftwareEngineering:UsingUML,Patterns,andJava:SolutionstoExercises©2004PrenticeHallNovember14,20031.IntroductiontoSoftwareEngineering:Solutions1-1Whatisthepurposeofmodeling?Thepurposeofmodelingistoreducecomplexitybybuildingasimplifiedrepresentationofrealitywhichignoresirrelevantdetails.Whatisrelevantornotisdefinedbythequestionsthemodelwillbeusedtoanswer.1–2Aprogramminglanguageisanotationforrepresentingalgorithmsanddatastructures.Listtwoadvantagesandtwodisadvantagesofusingaprogramminglanguageassolenotationthroughoutthedevelopmentprocess.Advantages:•Developersneedonlylearnonenotationforalldevelopmentactivities.•Traceabilityamongmodelsandbetweenmodelsandcodeismadeeasiersincetheyarewritteninthesamenotation.Disadvantages:•Aprogramminglanguageisalowlevelnotationwhichisdifficulttouseforrepresentinguserrequirements,forexample.•Aprogramminglanguageenablesandencouragesdeveloperstorepresentimplementationdetailstooearly.1–3Considerataskyouarenotfamiliarwith,suchasdesigningazero-emissionscar.Howwouldyouattacktheproblem?Thisisanopenendedquestionwhosepurposeisforstudentsthinkaboutproblemstheycannotsolvewithouthelp.Answersshouldcontaintwoormoreofthefollowingpoints:•Definetheproblempreciselybygatheringinformationfrompotentialusers.•Discovertheboundariesofthesolutionspacebygatheringinformationfromapplicationdomainexperts.•Brainstormideaswithotherpeople,includingexpertsandnonexperts•Evaluateideasusingprototypes,simulations,andcandidateusers.1–4Whatismeantby“knowledgeacquisitionisnotsequential”?Provideaconcreteexampleofknowledgeacquisitionthatillustratesthis.Knowledgeacquisitionisnonlinearinthesensethattheacquisitionofanewpieceofknowledgemayinvalidatepriorknowledge.Inotherterms,knowingonemorepieceofinformationmayleadyoutorealizethatwhatyouthoughtyouknewisinvalid.GalileoGalileiinvalidatedtheearthcentricmodeloftheuniversebyobservingthemoonsofJupiterandthephasesofVenus.1–5Hypothesizearationaleforthefollowingdesigndecisions:Thisexercisetestsifthestudentunderstandsthedifferencebetweenadecisionanditsrationale.Theexactrationaleprovidedbythestudentisnotimportantaslongasitisrationale(e.g.,theanswertothefirstbulletcouldhavebeentoallowsnowwhite’ssevendwarvestopurchasetraintickets).•“Theticketdistributorwillbeatmostoneandahalfmeterstall.”Enablechildrenandpersonsinwheelchairtopurchasetickets.•“Theticketdistributorwillincludetworedundantcomputersystems.”Toachieveahighlevelofavailabilitysuchthatticketdistributionisnotinterrupted(andthus,ticketsalesnotlostinthecaseofthefailureofonecomputer).•“Theticketdistributorwillincludeatouchscreenfordisplayinginstructionsandinputingcommands.Theonlyothercontrolwillbeacancelbuttonforabortingatransaction.”Object-OrientedSoftwareEngineering:UsingUML,Patterns,andJava:SolutionstoExercises©2004PrenticeHallNovember14,2003Enablesubstantialmodificationstotheinterface(e.g.,increasethenumberoftariffzonesorthenumberofproducts)withoutchangestothehardware.1–6Specifywhichofthefollowingstatementsarefunctionalrequirementsandwhicharenonfunctionalrequirements:•“Theticketdistributormustenableatravelertobuyweeklypasses.”•“TheticketdistributormustbewritteninJava.”•“Theticketdistributormustbeeasytouse.”Thefirstrequirementisfunctional,thethirdisnonfunctional.UsingthedefinitionsinChapter1,thesecondrequirementisnonfunctional.InChapter4,wewillcallthisrequirementapseudorequirementasitconstrainsaspectsofthesystemthatarenotvisibletotheuser.1–7Specifywhichofthefollowingdecisionsweremadeduringrequirementsorsystemdesign:•“Theticketdistributoriscomposedofauserinterfacesubsystem,asubsystemforcomputingtariff,andanetworksubsystemmanagingcommunicationwiththecentralcomputer.”•“TheticketdistributorwillusePowerPCprocessorchips.”•“Theticketdistributorprovidesthetravelerwithanon-linehelp.”Thefirstdecisionisasystemdesigndecision.Theseconddecisionisalsoasystemdesigndecisionifmadebydevelopers(otherwise,itisarequirementsdecision).Thethirddecisionisarequirementsdecision.1–8Inthefollowingdescription,explainwhenthetermaccountisusedasanapplicationdomainconceptandwhenasasolutiondomainconcept:“Assumeyouaredevelopinganonlinesystemformanagingbankaccountsformobilecustomers.Amajordesignissueishowtoprovideaccesstotheaccountswhenthecustomercannotestablishanonlineconnection.Oneproposalisthataccountsaremadeavailableonthemobilecomputer,eveniftheserverisnotup.Inthiscase,theaccountsshowtheamountsfromthelastconnectedsession.”Thefirsttwooccurrencesof“account”areapplicationdomainconceptswhilethelasttwooccurrencesaresolutiondomainconcepts.Thephrases“accountsaremadeavailableonthemobilecomputer”and“theaccountsshowtheamountsfromthelastconnectedsession”denoteasolutiondomainconceptthatgivesuserstheillusionthattheyareaccessingtheirbankaccountsontheirmobilecomputer.However,theactualbankaccountisnotonthemobilecomputer.1–9Whatisthedifferencebetweenataskandanactivity?Anactivityiscomposedofanumberoftasks.Bothrepresentwork,buttaskscannotconvenientlybedecomposedanyfurther.1–10Apassengeraircraftiscomposedofseveralmillionsofindividualpartsandrequiresthousandsofpersonstoassemble.Afo

1 / 86
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功