Sie sind auf Seite 1von 60

UNITIII

Analysis
Use case model
Approaches for identifying classes
9 Noun Phrase approach
9 CRC
Identifying Object relationships-
case study.
ObjectOrientedAnalysisProcess: IdentifyingUseCases
Introduction
1st stepinfindinganappropriatesolutiontoagivenproblem
statementistounderstandtheproblemanditsdomain
Mainobjectiveoftheanalysisistocaptureacomplete,
unambiguousandinconsistentpictureoftherequirementofthe
system
Analysis: istheprocessoftransformingaproblemdefinitioninto
acoherentstatementofthesystemsrequirement.Itinvolvesgreat
dealofinteractionwithpeople
Theanalyst hasfour majortoolsforextractinginformationabouta
system
1.Examinationofexistingsystemdocumentation
2.Interviews
3.Questionnaires
4.observation
WhyAnalysisisadifficultactivity?
Analysisisacreativeactivitythatinvolves

understandingtheproblem,itsassociatedconstrains
andmethodsofovercomingthoseconstraints
Thethree mostcommonsourceofrequirement
difficulties
1.Fuzzydescriptions
2.Incompleterequirements
3.Unnecessaryfeatures
Analysisisadifficultactivity wemustunderstand
theprobleminsomeapplicationdomainandthen
defineasolutionthatcanbeimplementedwith
software.Ifthefirsttryreflectserror,refinethe
applicationandtryagain
UseCasedrivenOOA:TheUnifiedapproach:
TheOOAphaseoftheUAusesactorsandusecases
todescribethesystemfromtheusersperspective
Actors areexternalfactorthatinteractwiththe
system
Usecases arescenariosdescribehowactorsuse
thesystem
TheOOAprocessconsistsoffollowingsteps
Identifyingtheactors
Developtheusecaseandactivitydiagram
Developinteractiondiagram
Classification
Refineanditerate
UseCaseModel:
Usecasesarescenariosforunderstanding
systemrequirements
Usecase isaninteractionbetweenusersand
asystem;itcapturethegoaloftheuserandthe
responsibilitiesofthesystemtoitsusers
Usecasemodelcanbeinstrumentedinproject
development,planninganddocumentationof
systemrequirements
Theusecasemodeldescribestheusesofthe
systemandshowsthecoursesofeventsthatcan
beperformed
Itcanalsodiscoverclassesandtherelationships
amongsubsystemofthesystems
Itcanbedevelopedbytalkingtotypicalusersand
discussingthevariousthingstheymightwanttodo
withtheapplicationbeingprepared
Itprovidesanexternalviewofasystemor
applicationitisdirectedprimarilytowardstheusers
ortheactorsofthesystem,notits
implementers(Seethefigure)
Itexpresswhatthebusinessorapplicationwilldo
andnothow(representationofclassdiagram,also
calledobjectdiagram/objectmodel gives
relationshipbetweenobjects,association,
inheritance)
Library

BorrowBooks

ReturnBooks

InterLibraryloan
CirculationClerk

Member
DoResearch

ReadBook,News
paper

PurchaseSupplies

Supplier
UsecaseundertheMicroscope:
Animportantissuethatcanassistusin
buildingcorrectusecaseisthe
differentiationbetweenusersgoaland
systeminteraction
Usecaserepresentthethingsthatthe
userisdoingwiththesystem,whichcanbe
differentfromtheusersgoal
Definition: AUseCaseisasequenceoftransactionsina
system whosetaskistoyieldresultsofmeasurablevalueto
anindividualactor ofthesystem
Usecase isaspecialflowofeventsthroughthesystems
Actors isauserplayingarolewithrespecttothe
system
Inasystem meanstheactorscommunicatewith
systemsusecase
Ameasurablevalue ausecasemusthelptheactorto
performataskthathassomeidentifiablevalues
Transaction itisanatomicsetofactivitiesthatare
performedeitherfullyornotatall
Librarysystemhas3actorand7usecases:
3Actors 7Usecases
1.Member 1.Borrowbooks
2.Supplier 2.Returnbooks
3.Circulationclerk 3.Getaninterliabilityloan
4.Doresearch
5.Readbooks/newspaper
6.Purchasesupplier
7.Checklibrarycard
Uses&ExtendsAssociations:
Usecasedescriptioncanbedifficulttounderstand
ifitcontainstoomanyalternativesorexceptional
flowsofeventsthatareperformedonlyifcertain
conditionsaremetastheusecaseinstanceiscarried
out
Awaytosimplifythedescriptionis,totake
advantageofextendsandusesassociations
Theextendsassociationisusedwhenthereisone
usecasethatissimilartoanotherusecasebutdoes
bitmore
Theusesassociationoccurswhendescribingthe
usecaseandnoticethatsomeofthemhavesubflows
incommon
BorrowBooks
Uses

extends CheckIDcard

GetanInterlibrary
loan Uses

Similaritybetweenusesandextendsassociationsis
thatbothcanbeviewedasakindofinheritance
Share usesassociation;
littlemoreadditionalwork extendsassociation
Usecasescouldbeviewedasconcreteorabstract
Anabstractusecaseisnotcompleteandhasno
initiationactorsbutisusedbyconcreteusecase
whichdoesinteractwithactors
Identifyingtheactors:
Identifyingclassesisasimportantasidentifyingtheclasses,
structures,associations,attributesandbehavior
Term actorrepresenttheroleoftheuser playswithrespecttothe
system
Whendealingwithactor,itisimportanttothinkaboutrolesrather
thanpeopleorjobtitles
Ausermayplaymorethanonerole
Youhavetoidentifytheactorsandunderstandhowtheywilluseand
interactwiththesystem
Actorscanalsobefoundthroughtheanswerstothefollowing
questions:
Whoisusingthesystem?
Whoaffectsthesystem?
Whichexternalhardwareorothersystemsusethesystemto
performtask?
Whatproblemdoesthisapplicationsolve?
Andfinally,howdousersusethesystem?
Canplayaroleof Performs
Borrow
John Members Books

Raja Employee OrderBooks

Lili Volunteer CheckID

USER ACTOR USECASE

DIFFERENCEBETWEENUSERANDACTOR
Guidelinesforidentifyingtheusecases:
Afterdefiningthesetofactors,nextstepisto
describethewaytheyinteractwiththesystem
Thisshouldbecarriedoutsequentially,butas
iteratedapproachmaybenecessary
Stepsinfindingtheusecases
1.Foreachactor,findthetaskandfunctionthat
theactorshouldbeabletoperformorthatthe
systemneedstheactortoperform
2.Nametheusecases
3.Describetheusecasesbrieflybyapplyingterms
withwhichtheuserisfamiliar
Onceyouhaveidentifiedtheusecases,itmaynotbe
apparent(clear)thatalloftheseusecasesneedtobe
describedseparately;somemaybemodeledasthe
alternateofothers
Itisimportanttoseparateactorsfromusers
Eachactorrepresentsarolethatoneorseveralusers
canplay.Thereforeitisnotnecessarytomodeldifferent
actorsthatcanperformthesameusecaseinthesame
way
Eachusecasehasonlyonemainactors,toachievethis
Isolateusersfromactors
Isolateactorsfromotheractors(separatethe
responsibilitiesofeachactor)
Isolateusecasesthathavedifferentinitiatingactor
slightlydifferentbehavior.
Howdetailmustausecasebe?Whentostop
Decomposingandwhentocontinue?
Usecase,asalreadystated,describesthecourses
ofeventthatwillbecarriedoutbythesystem
Duringanalysisofabusinesssystem,wecan
developoneusecasediagramasthesystemusecase
anddrawpackagesontheusecasetorepresentthe
variousbusinessdomainofthesystem
Singleproject,no:ofusecasedependsuponthe
problem
Togetagoodsolutioninanalysisphasethe
decompositionofusecasecanbeperformeduntilit
cannotbedecomposed
Dividingusecasesintopackages:
Eachusecaserepresentaparticularscenariointhe
system
Adesignisbrokendownintopackages
Eachpackagesgoingtodosomesetofoperations

BorrowBook DoResearch Purchase

Uses
BorrowBooks

CheckIDcard
GetanInterlibrary
loan
Uses
ReturnBooks
Member BorrowBooks
denied
NamingaUseCase:
Usecasenamesshouldprovideageneral
descriptionoftheusecasefunction
Nameshouldexpresswhathappenswhenan
instanceoftheusecaseisperformed
Thedescriptionoftheusecaseshouldbe
descriptiveandconsistent
ObjectAnalysis
Classification
ObjectAnalysis:Classification:
Introduction:
OOAisaprocessbywhichwecanidentify
classesthatplayaroleinachievingsystem
goalsandrequirements
Identificationofclassesisthehardestpart
ofOOAandDesign
ClassificationTheory:
Classification,theprocessofcheckingtoseeifanobject
belongstoacategoryoraclass,isregardedasabasic
attributeofhumannature.Eghumanbeingclassificationof
car
Classesareimportantmechanismforclassifyingobjects
Chiefroleofaclassistodefinetheattributes,methodsand
applicabilityofitsinstance
Itisfairlynaturetopartitiontheworldintoobjectsthat
haveproperties(attributes)andmethods(behavior)
Aclassisaspecificationofstructure,behaviorandthe
descriptionofanobject
Classificationonconcernedmorewithidentifyingtheclass
ofanobjectthantheindividualobjectwithinasystem
EgBetty owner,woman,employee,employer.
Approachesforidentifyingtheclasses:
Therearefourapproachesforidentifyingclasses
1. Nounphraseapproach
2. Commonclasspatternsapproach
3. Use casedriven,sequence/collaborationmodeling
approach
4. Classes,Responsibilitiesandcollaborators(CRC)
approach
1.NounPhraseApproach:
ProposedbyRebecca,BrainandLauren
Inthismethod,wereadthroughtherequirement
ofusecaseslookingfornounphrases
Nounsinthetextualdescriptionareconstructedto
beclassesandverbstobemethodsoftheclasses
Allpluralsarechangedtosingular,thenounsare
listedandthelistdividedintothreecategories
1.Relevantclasses
2.Fuzzyclasses(classthatarenotsureabout)
3.Irrelevantclasses
R.C F.C IR.C
Itissafetoswaptheirrelevantclasses,whicheitherhave
nopurposeorwillbeunnecessary
9Identifyingtentativeclasses
Followingareguidelinesforselectingclassesinan
application
lookfornounsandnounphrasesintheuse
cases
Someclassesareimplicitortakenfromgeneral
knowledge
allclassesmustmakesenseintheapplication
domain;avoidcomputerimplementationclasses
carefullychooseanddefineclassnames
Findingclassisnoteasy,itisanincrementaland
iterativeprocess
9Selectingclassesfromtherelevantandfuzzycategories
Followingguidelineshelpinselectingcandidate
classesfromtherelevantandfuzzycategoriesofclassesin
theproblemdomain
Redundantclasses: donotkeeptwoclassesthat
expressthesameinformation
Adjectiveclasses: Adjectivescanbeusedinmany
ways.Adjectivecansuggestadifferentkindsof
object,differentuseofthesameobjectoritcould
beutterlyirrelevant
AttributeClasses: tentativeobjectsthatareused
onlyasvaluesshouldbedefinedorrestatedas
attributesandnotasaclass
IrrelevantClasses: eachclassmusthaveapurpose
oreveryclassshouldbeclearlydefinedand
necessary
Likeanyotheractivityofsoftwaredevelopment,the
processofidentifyingrelevantclassesandeliminating
irrelevantclassesisanincrementalprocess
ClassificationistheessenceofgoodOOA&D
Theprocessofeliminatingtheredundantclassesand
refiningtheremainingclassesisnotsequential
Itcanbemovedbackandforthamongthesesteps(figure)
asoftenaswelike
ReviewRedundantclass

Reviewirrelevantclasses Reviewadjectives

Reviewattributes
2.CommonClassPatternsApproach:
SecondmethodforidentifyingclassesisusingCommonClass
Patterns,whichisbasedonaknowledgebaseofthecommon
classesthathavebeenproposedbyvariousresearchers,suchas
Metter.Ross.
Followingarethelistofpatternsforfindingthecandidate
classesandobjects
1.Name:Conceptclass:
Context Aconceptisaparticularideaorunderstanding
thatwehaveforourworld
Theconceptclassencompassesprinciplesthatare
nottangiblebutusedtoorganizeorkeep
trackofbusinessactivitiesorcommunication
Privatelyheldideasornotionsarecalled
conceptions
Eg.Performanceisanexampleofconceptclass
object
2.Name:EventClass:
Context Eventsclassesarepointsintimemustbe
recorded
Thingshappen,usuallytosomethingelseata
givendataANDTIME
Associatedattributes who,what,when,
where,why,howetc
Eg.Landing,interrupt,requestandorderare
possibleevents
3.Name:OrganizationClass:
Context Anorganizationclassisacollectionof
people,resources,facilitiesorgroupsto
whichtheuserbelongs.
Eg.Anaccountingdepartmentmightbe
consideredapotentialclass
4.Name:Peopleclass: (alsoknownasperson,rolesand
rolesplayedclass)
Context peopleclassrepresentsthedifferentroles
usersplayininteractingwiththeapplication
peoplecarryoutsomefunction
personcanbedividedintotwotypes
1.Thoserepresentingusersofthesystem
2.Thoserepresentingpeoplewhodonot
usethesystem
Eg.Employee,client,teacher
5.Name:PlacesClass:
Context placesarephysicallocationthatthesystem
mustkeepinformationabout
Eg.Building,stores,sites,offices
6.Name:Tangiblethingsanddevicesclass:
Context thisclassincludesphysicalobjectsor
groupsofobjectthataretangible
anddeviceswithwhichthe
applicationinteracts
Eg.Cars egfortangiblethings
Pressure egforandevice
3.UseCaseDrivenApproach:IdentifyingClassesand
theirbehaviorthroughsequence/collaboration
modeling:
Usecasesareemployedtomodelthescenariosin
thesystemandspecifywhatexternalactorsinteract
withthescenario
Scenario areexplainedintextorsequenceof
steps
Usecasemodelingisconsideredasproblemdriven
approachtoOOA,itisanrecommendedaidinfinding
theobjectofthesystem
9Implementationofscenarios:
UMLspecificationrecommendsthatatleastonescenariobe
preparedforeachsignificantlydifferentusecaseinstance
Eachscenarioshowsadifferentsequenceofinteraction
betweenactorsandthesystem,willalldecisiondefinite
Thisprocesshelpstounderstandthebehaviorofthesystems
object
whenarrivedatthelowestusecaselevel,wemaycreatea
childsequencediagramoraccompanyingcollaborationdiagramforthe
usecase
withthesequenceandcollaborationdiagrams,wecanmodel
theimplementationofthescenario
usecasediagram stepsarejusttextualdescriptiondefines
highlevelviewofasystem
sequencediagram enablestheinteractionbetweenobjects
inthesystem
4.Classes,Responsibilitiesandcollaborators
(CRC):
developedbyCunningham,beck
wasispresentedasawayofteachingthebasicconceptsof
OOD
CRCisatechniqueusedforidentifyingclasses,
responsibilitiesandthereforetheirattributesandmethods
Itismoreateachingtechniquethanamethodfor
identifyingclasses
Itisbasedontheideathatanobjecteithercanaccomplish
acertainresponsibilityitselforitmayrequiretheassistantof
otherobjects
Ifitrequirestheassistanceofotherobjects,itmust
collaboratewiththoseobjecttofulfillitsresponsibility
Byidentifyinganobjectsresponsibilitiesandcollaboratorswecan
identifyitsattributesandmethods
CRCcardare4 X6 indexcards
Allinformationarewritteninthecardwhichischeap,portable,
readilyavailableandfamiliar
Followingfigureshowsthecard

ClassName Collaborators
Responsibilities ..
..

Classname appearintheupperlefthandcorner
Bulletedlistofresponsibilitiesshouldappearunderitinthelefttwo
thirdsofthecard
Andlistofccollaboratorsintherightside
CRCstressestheimportanceofcreatingobjects
9CRCProcess:
Itconsistsof3stepsasshowninthefigure
IdentifyClasses
&
Responsibilities
Iterate

Identify Assign
Collaboration Responsibility

1. Identifyingclassesandresponsibility
2. Assignresponsibility
3. Identifycollaborators
Classesareidentifiedandgroupedbycommon
attributes,whichalsoprovidescandidatesforsuper
classes
ClassnamesarewrittenontoCRCCards,the
cardalsonotessubandsuperclassestoshow
theclassstructure
Applicationsrequirementsthenareexamined
foractionsandinformationassociatedwitheach
classtofindtheresponsibilitiesofeachclass
Next,theresponsibilitiesaredistributed,they
shouldbeasgeneralaspossibleandplacedas
highaspossibleininheritancehierarchy
theideainlocatingcollaboratorsistoidentify
howclassesinteract.Classesthathaveaclose
collaborationaregroupedtogetherphysically
NamingClasses:
Namingaclassisanimportantactivity
Someguidelinesfornamingtheclassesare:
a)Classnameshouldbesingular
b)Choosenamefromstandardvocabularyforthe
subjectmatter,selectnamewithwhichclientwill
becomfortable
c) Nameoftheclassshouldreflectitsintrinsic
nature(belongingtothebasicnatureof
something)
d)Usereadablenames,capitalizeclassname
Identifyingobject
relationship,attributesand
methods
Identifyingobjectrelationship,attributesand
methods:
Introduction:
inOOenvironment,objecttakeonanactiveroleina
system
objectdonotexistinisolationbutinteractwitheachother
indeed,theseinteractionsandrelationshipsarethe
application
relationshipamongobjectisbasedontheassumptioneach
makesabouttheotherobjectt
3typesofrelationshipsamongobjectsare
1. Association(designingclasses)
2. Supersubstructure(directionofinheritance)
3. Aggregationandapartofstructure(defining
mechanismthatpropertymanageobjectwithinobject)
1.Associations:
Itrepresentaphysicalorconceptualconnectionbetween
twoormoreobjects
Egifanobjecthastheresponsibilityfortellinganother
objectthatacreditcardno:isvalidorinvalid,thetwoclass
haveanassociationrelationship
Basicassociationrepresentation

AssociationName
ClassA ClassB
RoleOfA RoleOfB
IdentifyingAssociations:
Itbeginsbyanalyzingtheinteractionbetween
classes
Anydependencyrelationshipbetweentwoormore
classesisanassociation
Ifanobjectisresponsibleforaspecific
task(behavior)andlacksallnecessaryknowledge
neededtoperformthetask,thentheobjectmust
delegatethetasktoanotherobjectthatpossessessuch
knowledge
Toidentifytheassociationanswerthefollowing
questions
1. Istheclasscapableoffulfillingtherequiredtask
byitself?
2. Ifnot,whatdoesitneed?
3. Fromotherclassescanitacquirewhatitneed?
Guidelinesforidentifyingassociation:
Identifyingassociationbeginsbyanalyzingthe
interactionsbetweenclasses
Anydependencyrelationshipbetweentwoormore
classesisanassociation
Followingarethegeneralguidelinesforidentifyingthe
tentativeassociations:
1. Adependencybetweentwoormoreclassesmaybe
anassociation.Associationoftencorrespondstoa
verborprepositionalphrase,suchaspartof,nextto,
worksfororcontainedin
2. Areferencefromoneclasstoanotherisan
association.Someassociationsareimplicitortaken
fromgeneralknowledge
CommonAssociationpattern:
Thecommonassociationpatternarebasedonsomeofthe
commonassociationdefinedbyresearchersandpractioners
Theseinclude:
1. Locationassociation
2. Communicationassociation
1.Locationassociation: nextto,partof,containedin
Eg.Break apartof acar
2.Communicationassociation: talkto,orderto
Eg.Customerplacesanordertoperson

Customer Person

Order
Eliminatingunnecessaryassociations:
9Implementationassociation:
Areconcernedwiththeimplementationordesignoftheclass
withincertainprogramordevelopmentenvironmentandnot
relationshipsamongbusinessobjects
9Ternaryassociation:
Ternaryornaryassociationisanassociationamongmore
thantwoclasses
9Directed(orderived)association:
Itcanbedefinedintermsofotherassociations.Eg.Grand
parentof canbedefinedintermsoftheparentof
association
Grandparentof
X Y
Super Subclassrelationship:
Otheraspectofclassificationisidentificationof
supersubrelationshipamongclasses
Inthisthetopclassismostgeneral oneandfromit
descendallother,morespecialized class
Supersub classrelationrepresentstheinheritance
relationshipbetweenrelatedclasses
Itisalsocalledasgeneralizedhierarchy,aloeobjectto
builtfromotherobjects
Parentsclass alsocalledasbase/super/ancestor
Guidelinesforidentifyingsupersubrelationship,a
Generalization:
Followingareguidelinesforidentifyingsupersub
relationshipintheapplication
1. Top down
2. Bottomup
3. Reusability
4. Multipleinheritance
1.Top down: lookfornounphrasescomposedof
variousadjectivesinaclassname
Eg.Aphoneoperatoremployeecanberepresentedasacook
aswellasaclerkormanagerbecausetheyallhavesimilar
behavior
2. Bottom up: lookforclasseswithsimilar
attributesormethodsandputthemtogether
inacommonabstractclass
3.Reusability: moreattributesandmethodsas
highaspossibleinthehierarchy.Donotcreate
veryspecializedclassesatthetopofthe
hierarchy
4.Multipleinheritance: avoidexcessiveuseof
multipleinheritance
APartOfRelationships Aggregation:
Apartofrelationship,alsocalledaggregation,
representsthesituationwhenaclassconsistsof
severalcomponentclasses
Aclassthatiscomposedofotherclassesdoesnot
behavelikeitsparts;butbehavesdifferently
eg.Carconsistsofmanyotherclasses,oneofwhich
isradio,butacardoesnotbehavelikearadio
Car

Engine Radio

Carbura
tor
twomajorpropertiesofapartofrelationshipare
transitivityandantisymmetry
1.Transitivity: thepropertywhere,ifAispartofB
andBispartofC,thenAispartofC
Eg.Carburetorispartofcar
2.Antisymmetry: thepropertyofapartofrelation
whereifAispartofB,thenBisnotpartofA.
Eg.anengineispartofcar,butacarisnot
apartofanengine
9APartOfrelationshipPattern:
Followingguidelinesareusedtoidentitya
partofstructure
1.Assembly
2.Container
3.Collectionmember
1.Assembly: Itisconstructedfromitspartsand
anassemblypartsituationphysicallyexists;egsoup
2.Container: Aphysicalwholeencompassesbut
isnotconstructedfromphysicalparts.EgHouse
3.Collectionmember: Aconceptualwhole
encompassespartsthatmaybephysicallyor
conceptual.Egfootballteam
ClassResponsibility: IdentifyingAttributesand
methods:
Identifyingattributesandmethodislikefindingclasses,stilla
difficultactivityandaniterativeprocess
OnceagainusecaseandotherUMLdiagramswillbeourguide
foridentifyingattributes,methodsandrelationshipamongthe
classes
Responsibilitiesidentifyproblemstobesolved
Attributesarethingsanobjectmustremembersuchascolor,
costandmanufacturer
Identifyingattributesofasystemsclassesstartswith
understandingthesystemsresponsibilities
Followingquestionshelpinidentifyingtheresponsibilitiesof
classesanddecidingwhatdataelementstokeeptrackof:
1. Whatinformationaboutanobjectshouldwekeeptrackof?
2. Whatservicesmustaclassprovide?
ClassResponsibility: Definingattributesbyanalyzing
usecasesandotherUMLdiagrams:
Attributescanbederivedfromscenariotesting;therefore,
byanalyzingtheusecasesandsequence/collaboration,
activityandstatediagrams,wecanbegintounderstand
classes,responsibilitiesandhowtheymustinteractto
performtheirtasks.\
Maingoalhereistounderstandwanttheclassis
responsibleforknowing.Responsibilitiesisthekeyissues
UsingpreviousOOAresultsforanalysispatternscanbe
extremelyusefulinfindingoutwhatattributescanbereused
directlyandwhatlessonscanbelearnedforidentifying
attributes
9Guidelinesfordefiningattributes:
Someoftheguidelinesforidentifyingattributes
ofclassesinusecases:
Attributesusuallycorrespondtonouns
followedbyprepositionalphrasessuchas
costofthesoup.Attributesalsomay
correspondtoadjectives/adverbs
Keeptheclasssimple;stateonlyenough
attributestodefinetheobjectstate
Attributesarelesslikelytobefullydescribed
intheproblemstatement
Omitderivedattributes
Donotcarrydiscoveryofattributestoexcess
ObjectResponsibility:MethodsandMessages:
Objectsnotonlydescribeabstractdatabutalsomustprovide
someservices
MethodsandmessagesaretheworkhorsesofOOsystem
InanOOenvironment,everypieceofdata,orobjectis
surroundedbyarichsetofroutinescalledmethods.
Thesemethodsdoeverythingfromprintingtheobjectto
initializingitsvariables
Everyclassisresponsibleforstoringcertaininformationfromthe
domainknowledge
Italsoislogicaltoassigntheresponsibilityforperformingany
operationnecessaryonthatinformation
Operations(method/behavior)intheOOsystemusually
correspondtoquieriesaboutattributesoftheobjects
Inotherwords,methodsareresponsibleformanagingthevalues
ofattributessuchasquery,updating,readingandwriting
9DefiningmethodsbyanalyzingUMLdiagrams
andUsecases
Inasequencediagram,theobjectsinvolvedare
drawnonthedragasverticaldashedlines,theevents
thatoccurbetweenobjectaredrawnbetweenthe
verticalobjectlines
Aneventisconsideredtobeanactionthattransmits
information,theseactionareoperationthattheobject
mustperformandasintheattributes,methodsalso
canbederivedfromscenariotesting
Sequencediagramcanassistindefiningteservices
theobjectmustprovide.
ReviewQuestions

Whatisthedifferencebetweenusersandactors?
Whatisausecasemodel?Whyisusecasemodelingusefulinanalysis?
Howwouldyouidentifytheactors?
Whataretheguidelinesforidentifyingtentativeclassesinaproblemdomain?
Describerelevant,fuzzyandirrelevantclasses.
Whatisthecommonclasspatternstrategy
Whyisidentifyingclassesanincrementalprocess?
Whatisassociation?Giveanexample.
IsassociationdifferentfromanapartofrelationJustifyyouranswer.
Howwouldyouidentifyasupersubclassstructure?
WhataresomecommonAssociationsandcommonAggregations?
HowwouldyouidentifyAssociations?
Whataretheguidelinesforfindingusecases?
Whataretheguidelinesfordevelopingeffectivedocumentation?
Bibliography

ObjectorientedsystemdevelopmentbyAli
Brahami
ObjectorientedmethodologybyBooch
AtextbookonUMLbySrimathi

Das könnte Ihnen auch gefallen