软件体系结构考试.docx
《软件体系结构考试.docx》由会员分享,可在线阅读,更多相关《软件体系结构考试.docx(11页珍藏版)》请在冰豆网上搜索。
软件体系结构考试
CS6075FinalTake-HomeExamAnswers
9:
00am–3:
00pm,May19,2013
1.(8%)Answerthefollowingquestionsaboutthebigideaofsoftwarearchitectureinsoftwareengineering:
a)Whataretheprincipalinsightsfromthedisciplineofbuilding(conventional)architecturethatareapplicabletotheconstructionofsoftwaresystems?
Ans:
Weallliveinthem.
Weknowhowtheyarebuilt:
Requirements,Design(blueprints),Construction,Use.
Satisfactionofcustomers’needs.
Specializationoflabor.
Multipleperspectivesofthefinalproduct.
Intermediatepointswhereplansandprogressarereviewed.
Architectureisdifferentfrom,butlinkedwiththeproduct/structure.
Propertiesofstructuresareinducedbythedesignofthearchitecture.
Thearchitecthasadistinctiveroleandcharacter.
Processisnotasimportantasarchitecture.
Designandresultingqualitiesareattheforefront.
Processisameans,notanend.
Architecturehasmaturedovertimeintoadiscipline.
Architecturalstylesassetsofconstraints.
Stylesalsoaswiderangeofsolutions,techniquesandpalettesofcompatiblematerials,colors,andsizes.
Adistinctiveroleandcharacterinaproject.
Verybroadtraining.
Amassesandleveragesextensiveexperience.
Akeensenseofaesthetics.
Deepunderstandingofthedomain:
Propertiesofstructures,materials,andenvironmentsandNeedsofcustomers.
Evenfirst-rateprogrammingskillsareinsufficientforthecreationofcomplexsoftwareapplications.
b)Lists5ormoredifferencesbetweentasksofasoftwarearchitectandabuildingarchitect.Explainyouranswer.
Ans:
Thenatureofsoftwareisdifferentfromthatofbuildingarchitecture.Theyaredifferentthingsindifferentareas.
Softwareismuchmoremalleablethanphysicalmaterials.Whenabuildingisbuilt,itcan’tbechanged.However,softwarecanbeupdatedandrebuilt.
Thetwo“constructionindustries”areverydifferent.Thetwowholeindustrieshavenosimilarity.
Softwaredeploymenthasnocounterpartinbuildingarchitecture.
Softwareisamachine;abuildingisnot.
Softwarecanbeeasilycopied;abuildingisnot.
2.(8%)Answerthefollowingquestionsaboutthesoftwarearchitecturecentricapproachinsoftwarelifecycle:
a)Thearchitecture-centricapproachemphasizesthatsoftwarearchitectureisartifact,notsoftwaredevelopmentphase.Explainthatifweonlyconsidersoftwarearchitectureasadevelopmentphase,whattheroleofsoftwarearchitectureisinsoftwarelifecycle.Explainthatifweconsidersoftwarearchitectureasdevelopmentartifact,whattheroleofsoftwarearchitectureisinsoftwarelifecycle.
Ans:
Asaphase:
Treatingarchitectureasaphasedeniesitsfoundationalroleinsoftwaredevelopment.Itismorethan“high-leveldesign”.Architectureisalsorepresented,e.g.,byobjectcode,sourcecode,...
Asaartifact:
Theroleisinthewholesoftwarelifecycle,containingRequirements,Design,Implementation,AnalysisandTesting,EvolutionandDevelopmentProcess.
Requirements:
TraditionalSEsuggestsrequirementsanalysisshouldremainunsulliedbyanyconsiderationforadesign.However,withoutreferencetoexistingarchitecturesitbecomesdifficulttoassesspracticality,schedules,orcosts.Inbuildingarchitecturewetalkaboutspecificrooms……ratherthantheabstractconcept“meansforprovidingshelter”.Inengineeringnewproductscomefromtheobservationofexistingsolutionandtheirlimitations.Existingdesignsandarchitecturesprovidethesolutionvocabulary.Ourunderstandingofwhatworksnow,andhowitworks,affectsourwantsandperceivedneeds.Theinsightsfromourexperienceswithexistingsystemshelpsusimaginewhatmightworkandenablesustoassessdevelopmenttimeandcosts.Requirementsanalysisandconsiderationofdesignmustbepursuedatthesametime.
Design:
Traditionaldesignphasesuggeststranslatingtherequirementsintoalgorithms,soaprogrammercanimplementthem.Architecture-centricdesignstakeholderissuesdecisionaboutuseofCOTScomponentoverarchingstyleandstructurepackageandprimaryclassstructuredeploymentissuespostimplementation/deploymentissues.
Implementation:
Theobjectiveistocreatemachine-executablesourcecode.Thatcodeshouldbefaithfultothearchitecture.Alternatively,itmayadaptthearchitecture.Howmuchadaptationisallowed?
Architecturally-relevantvs.-unimportantadaptations.Itmustfullydevelopalloutstandingdetailsoftheapplication
AnalysisandTesting:
Analysisandtestingareactivitiesundertakentoassessthequalitiesofanartifact.Theearlieranerrorisdetectedandcorrectedthelowertheaggregatecost.Rigorousrepresentationsarerequiredforanalysis,soprecisequestionscanbeaskedandanswered.
Evolution:
Motivation.Evaluationorassessment.DesignandchoiceofapproachActionincludespreparationforthenextroundofadaptation
DevelopmentProcess:
Traditionalsoftwareprocessdiscussionsmaketheprocessactivitiesthefocalpoint.Inarchitecture-centricsoftwareengineeringtheproductbecomesthefocalpoint.Nosingle“right”softwareprocessforarchitecture-centricsoftwareengineeringexists.
b)Explainthat,intermsofunittestsofasoftwaresystem,basedonthesystem’ssoftwarearchitecturemodels,whatblack-boxtestcasescanbedesigned?
Whatwhite-boxtestcasescanbedesigned?
Ans:
3.(20%)Answerthefollowingquestionsabouttheconceptsofsoftwarearchitecture:
a)Give2ormorereasonsthatpotentiallycauseasoftwaresystem’sprescriptiveanddescriptivearchitecturesmismatch?
Ans:
Asystem’sprescriptivearchitecturecapturesthedesigndecisionsmadepriortothesystem’sconstruction.Itistheas-conceivedoras-intendedarchitecture
Asystem’sdescriptivearchitecturedescribeshowthesystemhasbeenbuiltItistheas-implementedoras-realizedarchitecture
Reasons:
Thenatureofthecomponents
Thenatureoftheconnection
Theglobalnatureofthearchitecture
Constructionprocesses
b)Useonesentencetoexplaineachofthefollowingelementsofasoftwaresystem’sarchitecture:
component,connector,andconfiguration.
Ans:
Component:
encapsulateprocessinganddatainasystem’sarchitecture
Connector:
anarchitecturalbuildingblocktaskedwitheffectingandregulatinginteractionsamongcomponents
Configuration:
asetofspecificassociationsbetweenthecomponentsandconnectorsofasoftwaresystem’sarchitecture
c)Softwarearchitectureisasetofprincipledecisionsonasoftwaresystemin4aspects:
structure,behavior,interaction,andnon-functionalproperties.Youareaskedtodesignasoftwaresystemforausertomanagehiscontactlistwiththefollowingfunctionality:
addanewcontact,deleteacontact,updateacontact,searchacontact,andviewacontact.ThesoftwarearchitecturemustbebasedonMVCarchitecturalpattern.
·DrawaUMLclassdiagram,withclassesandtheirrelationships,toshowthestructureofthesystemarchitecture.Foreachclassinthediagram,justgiveitsnameandoperationswithoutsignature.
·DrawaUMLsequencediagramtoshowthecollaborativeobjectbehaviorsthatimplementoneoftheaboveoperations.
·Describeyourchoiceofconnectorsthatimplementcommunicationsbetweensystemcomponents.
·Giveoneexamplerequirednon-functionalpropertyofthesystem.
Ans:
Classdiagram
Sequencediagram
4.(12%)Answerthefollowingquestionsaboutsoftwarearchitecturalstyles:
a)Useonesentencetoexplaineachofthefollowingcategoriesofarchitecturalstyles:
layered,dataflow,sharedmemory,interpreter,implicitinvocation,andpeer-to-peer.
Ans:
layered:
Hierarchicalsystemorganization.“Multi-levelclient-server”.Eachlayerexposesaninterface(API)tobeusedbyabovelayers
dataflow:
Separateprogramsareexecutedinorder;dataispassedasanaggregatefromoneprogramtothenext.
sharedmemory:
memorythatmaybesimultaneouslyaccessedbymultipleprogramswithanintenttoprovidecommunicationamongthemoravoidredundantcopies
Interpreter:
Interpreterparsesandexecutesinputcommands,updatingthestatemaintainedbytheinterpreter
implicitinvocation:
atermusedbysomeauthorsforastyleofsoftwarearchitectureinwhichasystemisstructuredaroundeventhandling,usingaformofcallback.
peer-to-peer:
adistributedapplicationarchitecturethatpartitionstasksorworkloadsbetweenpeers.
b)Whatisincommonbetweenvirtualmachinestyleandinterpreterstyle?
Whatisthedeferencebetweenthetwo?
Explainyouranswer.
Ans:
Avirtualmachine(VM)isasoftwareimplementedabstractionoftheunderlyinghardware,whichispresentedtotheapplicationlayerofthesystem.Virtualmachinesmaybebasedonspecificationsofahypotheticalcomputeroremulatethecomputerarchitectureandfunctionsofarealworldcomputer.
Interpreterparsesandexecutesinputcommands,updatingthestatemaintainedbytheinterpreter
Components:
Commandinterpreter,program/interpreterstate,userinterface.
Connectors:
Typicallyverycloselyboundwithdirectprocedurecallsandsharedstate.
Highlydynamicbehaviorpossible,wherethesetofcommandsisdynamicallymodified.Systemarchitecturemayremainconstantwhilenewcapabilitiesarecreatedbaseduponexistingprimitives.
Superbforend-userprogrammability;supportsdynamicallychangingsetofcapabilities
LispandScheme
c)Whenyouuseanobject-orientedprogramminglanguage,suchasJava,todevelopasoftwaresystem,thesystemimplicitlyappliesobject-orientedarchitecturalstyle.Applyinganyadditionalarchitecturalstyleresultsinthatthesystemarchitecturewillbebasedonacombinationoftwoormorestyles.Useanexampletosh