相关考题

单项选择题 YouworkasanapplicationdeveloperatCertkiller.com.YouhaverecentlycreatedacustomcollectionclassnamedShoppingListforalocalsupermarket.ThiscustomclasswillincludeShoppinItemobjectsthathavethepublicpropertieslistedbelow.*Name*AisleNumber*OnDiscountYouarerequiredtoenableusersofyourclasstoiteratethroughtheShoppingListcollection,andtolisteachproductnameandaislenumberusingtheforeachstatement.Youneedtoachievethisbydeclaringtheappropriatecode.Whatcodeshouldyouuse?()

单项选择题 YouworkastheapplicationdeveloperatCertkiller.com.Certkiller.comusesVisualStudio.NET2005asitsapplicationdevelopmentplatform.YouhaverecentlyfinisheddevelopmentofaclassnamedTestRewardandpackagetheclassina.NET2.0assemblynamedTestObj.dll.Afteryoushiptheassemblyanditisusedbyclientapplications,youdecidetomovetheTestRewardclassfromTestObj.dllassemblytotheTestRewardObj.dllAssembly.YouaretoensurewhenyoushiptheupdatedTestObj.dllandTestRewardObj.dllassembliesthattheclientapplicationscontinuetoworkanddonotrequirerecompiling.Whatshouldyoudo?()

单项选择题 YouworkasanapplicationdeveloperatCertkiller.com.YouarecurrentlyintheprocessofcreatingaclassthatstoresdataaboutCertkiller.com’scustomers.Certkiller.comcustomersareassigneduniqueidentifiersandvariouscharacteristicsthatmayincludealiases,shippinginstructions,andsalescomments.Thesecharacteristicscanchangeinbothsizeanddatatype.YoustartbydefiningtheCustomerclassasshownbelow:publicclassCustomer{privateintcustID;privateArrayListattributes;publicintCustomerID{get{returncustID;}}publicCustomer(intCustomerID){this.custID=CustomerID;this.attributes=newArrayList();}publicvoidAddAttribute(objectatt){attributes.Add(att);}}YouhavetocreatetheFindAttributemethodforlocatingattributesinCustomerobjectsnomatterwhatthedatatypeis.YouneedtoensurethattheFindAttributemethodreturnstheattributeiffound,andyoualsoneedtoensuretype-safetywhenreturningtheattribute.Whatshouldyoudo?()