雨课堂学堂在线学堂云《基于Java的面向对象编程范式( 南京)》单元测试考核答案_第1页
雨课堂学堂在线学堂云《基于Java的面向对象编程范式( 南京)》单元测试考核答案_第2页
雨课堂学堂在线学堂云《基于Java的面向对象编程范式( 南京)》单元测试考核答案_第3页
雨课堂学堂在线学堂云《基于Java的面向对象编程范式( 南京)》单元测试考核答案_第4页
雨课堂学堂在线学堂云《基于Java的面向对象编程范式( 南京)》单元测试考核答案_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

注:不含主观题第1题判断题(2分)Scientificthinkingisthetransformationofanunsolvedproblemintoasolvedproblemwithfeworalmostnoconstraintstoobtainatheoreticallyoptimalsolution第2题单选题(2分)Pleaseselectthecorrectorderofevolutionofthinkinginsoftwareengineering:a.Mathematicalmodelingb.Computermodelingc.SoftwareengineeringmodelingAbacBabcCcbaDbca第3题单选题(2分)ThevonNeumannarchitectureisthememory,controlunit,arithmeticunitand()AInput/OutputBPowerSupplyCMotherboardDChassis第4题单选题(2分)Instructionssuchas'MOV?A,06H'belongtowhichlanguage?AMachinelanguageBAssemblyLanguageCHigh-levelLanguagesDNaturalLanguage第5题判断题(2分)Differentsoftwareframeworksorhardwareframeworkssolveproblemsinthesameway第6题单选题(2分)Theanalysismodelthathelpsussummarizethesystemscenarioanddescribewhatthesystemisgoingtodois()AClassdiagramBSystemSequenceDiagramCUseCaseDiagramDStateDiagram第7题判断题(2分)Theproductoftherequirementsanalysisphaseisthesoftwarerequirementsspecification(SRS),whichprovidesaroughdescriptionofsomeunclearrequirementsofthesystem第8题单选题(2分)Codeandexecutablesaretheproductofwhichstep?ARequirementsAnalysisBDesignCConstructingDEvolution第9题判断题(2分)Decompositionandabstractionarewaystoreducecodecomplexity第10题单选题(2分)Pleaseselectallthemethodsthatcanreducethecomplexityofthesystema.Abstractionb.Layeringc.DecompositionAabcBbCcDac第11题判断题(2分)Ajavafilecanhavemorethanonepublicclassnameandthenamecanbedifferentfromthejavafilename第12题单选题(2分)PleaseselecttheentrymethodforJAVA.Apublicvoidmain()Bpublicstaticvoidmain()Cpublicstaticvoidentry()Dpublicstaticvoidmain(String[]args)第13题单选题(2分)Pleaseselectthemostappropriateonefromthefollowingoptionsasthenameofthevariable'lastpayment'ApaymentBxClastPaymentDlp第14题单选题(2分)Whatisthefirstthingweneedtoaccomplishbeforewecanproceedwithsoftwareengineeringmodeling?ADefinethedevelopmentframeworkandrequirementsBDesignandbuildthecomputermodelCDevelopasolutionDCheckthequalityofthesoftware第15题单选题(2分)PleaseselectthecorrectorderofthestepsintheSoftwaredevelopmentlife-cyclemodel(SDCM)a.requirementsanalysisb.designc.constructiond.testinge.deliveryandevolutionAabcdeBacbdeCbacdeDbadce第二章章节测试第1题单选题(2分)StructuredprogrammingisbrokendownbywhatAAlgorithmBDataStructureCPersonalInterestDProgrammingPurpose第2题判断题(2分)Asysteminadataflowdiagramisacollectionofprocesses第3题多选题(2分)Datachangesinadataflowdiagraminclude()AConvertedBStoredCBeingdistributedDDisassembled正确答案:ABC第4题判断题(2分)Structureddiagramscanonlyexpressthedependenciesbetweenmodules第5题单选题(2分)Whichofthefollowingmodulesarenotpartofastructuredgraph?AOutputmodulesBBranchingModulesCControlmoduleDProcessingmodules第6题单选题(2分)do{...}until{...}statementsbelongto()AJumpBBranchingCLoopDOrder第7题判断题(2分)Thegotoinstructionbreaksthereadabilityofthecode第8题多选题(2分)Thebenefitsofavoidingcodeduplicationare()ASavingtimeBImprovingcodereadabilityCImprovingcodequalityDImprovingcodemodifiability正确答案:BCD第9题多选题(2分)Testingincludes()ARedBoxTestingBBlackBoxTestingCWhiteboxtestingDPandora'sBoxTesting正确答案:BC第10题判断题(2分)Black-boxtestingrequiresknowledgeofthecodestructure第三章单元测试第1题单选题(2分)(3-01)Whichofthefollowingstatementsisincorrect?().AAgooddesigniswellequippedtohandleallchanges,bothpredictableandunpredictable.BWemustrespondtochangesandusegooddesigntoefficientlysolvenewproblemsinreality.CFor"expected"changes,wemustdesigntopreventsuchchanges.DFor"unanticipated"changes,wehavetofindsomecompromisetofixandhandlethem.第2题判断题(2分)(3-02)Whenimplementationchanges,requirementadditions,orrequirementchangesoccur,extensivemodificationstostructuredprogramsoccur.第3题单选题(2分)(3-02)Whichofthefollowingstatementsisincorrect?().ACompile-timestaticlinkingbyextensiontoeliminatelargescalechangesisachievedusinginheritanceandpolymorphismsupportedbyobject-oriented.BSeparatingrelatedoperationsintosub-modulescanreducethescopeofmodification.CPuttingrelatedoperationsandrelateddatatogethercanfurtherreducethescopeforchange.DDynamiclinkingatruntimemeansisolatingbehavioralimplementationsandbehavioralabstractionsatcodingtime,andthendynamicallybindingandlinkingthematruntime.第4题单选题(2分)(3-03)Whichofthefollowingstatementsisincorrect?().ABothclassesandobjectsareembodimentsofresponsibilities,thedifferencebeingthatobjectsareabstractionsofresponsibilitiesandclassesareconcreteimplementationsofresponsibilities.BThemostimportantthinginobject-orientedistheresponsibilities,dataresponsibilitiesarethestorageofstateandbehavioralresponsibilitiesaretheexecutionofoperations.CThemostimportantmanifestationofresponsibilityisthatdataresponsibilityandbehaviorresponsibilityaretogether.DTheobject-orientedapproachisfromaresponsibilityperspective,focusingonhowresponsibilitiesareassigned,interactandcollaborate.第5题多选题(3分)(3-04)Theprocessofobtaininganobjectincludesfindingacandidateobjectandrefiningtheobject.Amongthem,thesearchforcandidateobjectsincludes().AFindbehaviorsandmethodsbylookingforverbsBFindclasses(objects)andpropertiesbylookingfornounsCRemovingredundancy,irrelevance,andambiguityDTransforminganobjectwithoutbehaviorintoapropertyofaclass正确答案:AB第6题判断题(2分)(3-04)Aclassisacollectionofidenticalthingsthatdescribesthenon-essentialcharacteristicsofthesetofthingswearetryingtodescribe.第7题单选题(2分)(3-04)TheprocessofcreatingandaccessinganobjectofaclassinJavaincludes().AAllotheroptionsBDeclaringreferencevariablesCCreatenewclassobjectsandallocatestorageareasinmemoryDPointingreferencevariablestorealobjects第8题单选题(2分)(3-06)"Don'treinventthewheel"bestreflectstheideaofsoftware().AReusabilityBReliabilityCModifiabilityDEaseofuse第9题多选题(3分)(3-06)Whichofthefollowinglayersareincludedinthelayeredstyle().APresentationlayerBLogiclayerCDatalayerDPersistencelayer正确答案:ABC第10题判断题(2分)(3-07)Whentestingmethodsthatareonlyrelatedtothesameclass(semi-independent),itisnecessarytotestthemethodsthataredependentontheclassfirst.第四章章节测试第1题单选题(2分)Therulesthatawell-implementedwrappershouldsatisfydonotinclude()AMeethighcouplingandlowcohesionBPuttingtogetherthedataandthebehaviorofmanipulatingthedataCUseresponsibility-drivendesignprinciplestodecidedataandbehaviortogetherDResponsibilitiesshouldbecomplete第2题判断题(2分)1.publicclassPosition{2.doublelatitude;3.doublelongitude;4.5.publicstaticdoublecalDistance(doublex1,doubley1,doublex2,doubley2){6.......7.}8.9.publicstaticdoublecalDirection(doublex1,doubley1,doublex2,doubley2){10.......11.}12.}Isthedesignoftheabovecodereasonable?第3题判断题(2分)1.classPoint{2.doublex;3.doubley;4.5.publicdoublecalDistance(Pointa){6.......7.}8.}Doestheabovecodedesignmakesense?第4题判断题(2分)Dataresponsibilitiescharacterizetheessentialcharacteristicsoftheobject,andbehavioralresponsibilitiescharacterizetheessentialbehavioroftheobject第5题单选题(2分)Whichofthedescriptionoftheconceptclassdiagramisincorrect?AConceptclasshasnobehaviorBConceptualclassdiagramsmustbedefinedbasedonsystemrequirementsCIfthecandidateclassdoesnotneedtomaintainstateonlybehavior,andthereisnootherassociatedstatewithit,wecaneliminatethiscandidateclassDThebasicelementsoftheconceptualclassdiagramareobjects,classes,links,associations(aggregation),inheritance第6题单选题(2分)Whichofthedescriptionaboutclassdiagramsisincorrect?AThe"-"intheclassdiagrammeansprotected,"+"meanspublicBClassdiagramsareusedtorepresentthe"together"ofdatabehaviorCMembervariablesintheclassdiagramcanbedefinedwithinitialvaluesDClassdiagramsshouldbedrawnaccordingtostandardUMLdefinitions第7题单选题(2分)Whichofthefollowingstatementaboutdefensiveprogrammingisincorrect?AAssertionsaremainlyusedafterthereleaseoftheproducttoallowtheprogramtoself-checkthecodeatruntimeBInordertoavoidcorruptionofillegallyentereddata,wehavetocheckthevaluesofallexternallysourceddataCNeedtocheckthevalueofallinputparametersofthesubroutineDWecanuseassertionstopreventerrorsduringtherunningofthecode第8题单选题(2分)1.publicintfindMax(int[]array){2.if(array==null||array.length==0)----------------(1)3.return-1;4.intmax=array[0];------------------------(2)5.for(inti=1;i6.if(array[i]>max)--------------------(3)7.max=array[i];8.}9.returnmax;---------------------------(4)10.}11.WhichpartoftheabovecodeembodiestheideaofdefensiveprogrammingA(1)B(2)C(3)D(4)第9题单选题(2分)Whichofthefollowingstatementisincorrect?AAftercreatingtheclassobject,jvmwillimmediatelyinitializethestaticvariablesBStaticmethodscannotaccessnon-staticmethodsCStaticmethodscannotaccessnon-staticvariablesDStaticvariablesareinitializedbeforebeingcalledbyanystaticmethod第10题单选题(2分)1.publicclassDuck{

2.

staticintduckCount;3.

intcount;

4.5.

publicDuck(){

6.duckCount++;

7.count++;

8.

}

9.

10.publicstaticvoidmain(String[]args){

11.

Duckd1=newDuck();12.

System.out.println(Duck.duckCount);13.

System.out.println(d1.count);14.

Duckd2=newDuck();

15.

System.out.println(Duck.duckCount);

16.

System.out.println(d2.count);

17.}

18.}

Theoutputoftheabovecodeis()A1,1,2,1B0,0,1,0C1,1,2,2D1,1,1,2第五章章节测试第1题判断题(2分)Objectsinlifecanplaymultipleresponsibilities,sointheobject-orientedworld,anidealclasscanalsoplaymultipleresponsibilities第2题单选题(2分)Howcanyoutellwhenaclasshasmorethanoneresponsibility?AWhenitprovidesalargenumberofinterfacesBWhenithasalargenumberofmembervariablesCWhentherearemultipleobjectstointeractwithitDWhentherearemultiplechangesthatrequireustomodifythisclass第3题多选题(2分)Whichoneofthefollowingarecollaborativeobjects?ATheobjectitselfBAnyobjectpassedinasaparameterCObjectscreateddirectlybythatobjectDReferencestotheobjectsheld,i.e.membervariables正确答案:ABCD第4题判断题(2分)Whenaclientcallsaserverinterface,itshouldnotonlyknowthefunctionoftheinterface,butalsothedetailsoftheserverimplementation第5题单选题(2分)Therelationshipsbetweenclasses,indescendingorderofweakness,areACommonAssociations<Dependencies<Combinations<AggregationsBNormalassociation<Dependency<Aggregation<CombinationCDependencies<CommonAssociations<Combinations<AggregationsDDependencies<CommonAssociations<Aggregation<Combinations第6题单选题(2分)AnobjectAdoesnotholdareferencetoanobjectB,butBisusedinamethodofA.ThentherelationshipbetweenAandBisAInheritanceBDependenciesCAggregationDAggregation第7题多选题(2分)Whichoneofthefollowingstatementsistrueaboutaggregation?AItisastrongversionoftheassociationBItimpliesanaffiliationandlifetimerelationshipCTheaggregatedobjectcannotbeassociatedwithotherobjectsDInUMLdiagrams,aggregationisrepresentedasasolidline,withasoliddiamond正确答案:AB第8题单选题(2分)WhichoneofthefollowingEnglishphrasesisusedtoexpresscombinatorialrelationships?AusesaBhasaCownsaDisapartof第9题单选题(2分)Inacashiersystem,usingadelegateddesignstyle,whoshouldcalculatethepriceofeachitem?ASaleBSalesLineItemCProductDMain第10题判断题(2分)Inasequencediagram,synchronousmessagesaresolidtriangulararrows,andreturnandasynchronousmessagesaredashedfishbonearrows第六章章节测试第1题单选题(2分)Whichofthefollowingisanincorrectdescriptionofmodifiability?AExtensibilitywantstodonotaffectClientcodeBNarrowmodifiabilitywantstonotaffectClientcodeCFlexibilitywantstonotaffecttheClient'susingoftheclass'scodeDFlexibilitymeansdynamicconfigurationoftheimplementation第2题单选题(2分)Whichofthefollowingstatementsaboutinheritanceisincorrect?ASubclassescanoverridemembervariablesoftheparentclassBSubclassesinheritallmembervariablesandmethodsoftheparentclassCSubclassescanaddmembervariablesandmethodsDSubclassescanoverridemembermethodsoftheparentclass第3题单选题(2分)Whichofthefollowingstatementsaboutpolymorphismisincorrect?APolymorphismdoesnoteliminatecouplingbetweentypesBPolymorphismimprovestheorganizationofthecodeCPolymorphismcanimprovethereadabilityofthecodeDInpolymorphismonlycareaboutwhatanobjectdoes,nothowitdoesit第4题单选题(2分)Whichofthefollowingisincorrectlydescribedaboutabstractclassesandabstractmethods?AAbstractclassesmusthaveabstractmethodsBNon-abstractclassescannothaveabstractmethodsinthemCAbstractclassescanhavenon-abstractmethodsDAbstractclassescan'tbeinstantiated第5题单选题(2分)Whichofthefollowingisincorrectlydescribedaboutinterfacesinjava?AInterfacesmaynotinheritfrominterfacesBAclasscanimplementmorethanoneinterfaceCAclasscannotinheritfrommorethanoneclassDVariablescanbeownedinaninterface第6题单选题(2分)Whichofthefollowingisincorrectlydescribedaboutinheritanceandcombination?AInheritanceisusuallybetterthancombinationBInheritanceisanis-arelationshipCCombinationsar

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论