您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 能源与动力工程 > 面向对象软件工程(使用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
本文标题:面向对象软件工程(使用UML-模式与Java)全套课后习题答案
链接地址:https://www.777doc.com/doc-1843050 .html