2011
UML 2 &
Use Case Models
BinnurKurt,Ph.D.
OmegaTrainingandConsultancy
www.omegaegitim.com
binnur.kurt@gmail.com
UML2&UseCaseModels
Agenda
1. ModelingwithUML2andSoftwareDevelopmentProcess
2. CreatingUseCaseDiagrams
3. CreatingUseCaseScenariosandForms
30.10.2011
UML2&UseCaseModels
Background
1995,B.Sc.
1997,M.Sc.
2007,Ph.D.
(AllinComputerEngineering)
20042008,Lecturer, ITUComputer Eng. Dept.
2008todate,Trainer &Consultant
UML2&UseCaseModels
References UML2
30.10.2011
UML2&UseCaseModels
UML2&UseCaseModels
30.10.2011
UML2&UseCaseModels
Biography
Dr. Binnur Kurt received BS, MS, and PhD degrees from Istanbul Technical
University in 1995, 1997, 2007 all in computer engineering. He was a
lecturer at the Computer Engineering Department of Istanbul Technical
University from 2004 to 2007 and offered courses mostly on web
programming and object oriented software engineering. He is currently
working as an information technology consultant and trainer in Java
Enterprise Technologies, Object Oriented Analysis and Design, Service
Oriented Architecture, MySQL, Oracle Middleware Technologies, Unix
Programming and Administration, High performance computing, and Real
Time Computer Vision systems. He has published many international
conference and journal papers, and book chapters on these topics. He has
also designed many IT trainings and written training materials on
advanced topics, including Spring Framework, JSF, XML Web Services,
Service Oriented Architecture, and OSGi. He holds several certifications,
including Sun Certified Java Programmer, Oracle Certified Professional
MySQL 5.0 Developer, Oracle Certified Professional MySQL 5.0 Database
Administrator and Red Hat Certified Engineer. He is also referee for the
assessment of industrial projects submitted to TUBITAK Technology and
Innovation Funding Programs Directorate (TEYDEB) and inspector for
industrial projects supported by TUBITAK Technology and Innovation
Funding Programs Directorate (TEYDEB).
UML2&UseCaseModels
AreasofInterest
>
>
>
>
>
>
JavaDesktopandEnterpriseTechnologies
SOA
OOAD
MySQL
OracleDirectoryServer
ApplicationServers:WebLogic,Glassfish,Tomcat
30.10.2011
1
ModelingwithUML2
and
SoftwareDevelopmentProcess
UML2&UseCaseModels 1 ModelingwithUML2
10
SoftwareComplexity
> Theprofileandimportanceofsoftwarehasincreased
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
11
SoftwareComplexityisincreasing
UML2&UseCaseModels 1 ModelingwithUML2
12
Andthingsareonlygoingtogetworse
> Increasinglycomplex,vulnerableand everychanging
platforms,applications andcustomerdesires.
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
13
ImportantSkills
> Theseskillsareessentialforthecreationofwelldesigned,robust,and
maintainablesoftware
OOA/D
Patterns
UMLnotation
Skills
Principlesand
guidelines
Requirements
analysis
Software
Development
ProcessModel
> Applyprinciplesandpatternstocreatebetterobjectdesigns.
> Followasetofcommonactivitiesinanalysisanddesign,basedonthe
UnifiedProcessasanexample.
> CreatediagramsintheUMLnotation.
UML2&UseCaseModels 1 ModelingwithUML2
14
OOConcepts
>
>
>
>
>
>
>
>
>
>
>
Objects
Classes
Abstraction
Encapsulation
Inheritance
Interfaces
Polymorphism
Cohesion
Coupling
Classassociationsandobjectlinks
Delegation
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
15
OOPPrincipals
>
>
>
>
>
>
>
TheSingleResponsibilityPrinciple(SRP)
TheOpen/ClosedPrinciple(OCP)
TheLiskov SubstitutionPrinciple(LSP)
CommonClosurePrinciple(CCP)
AcyclicDependencyPrinciple(ADP)
StableDependenciesPrinciple(SDP)
StableAbstractionsPrinciple(SAP)
UML2&UseCaseModels 1 ModelingwithUML2
16
Patterns
>
>
>
>
>
DesignPatterns GoFPatterns
SecurityPatterns
NetworkingPatterns
Concurrent,ParallelSystemPatterns
JavaEEPatterns
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
17
DescribingSoftwareMethodology
Amethodologyisabodyofmethods,rules,andpostulates
employedbyadiscipline[WebsterNewCollegiateDictionary]
> InOOSD,methodologyreferstothehighestlevel
organizationofasoftwareproject.
> Thisorganizationcanbedecomposedinto medium
levelphases.Phasesaredecomposedinto workflows
(disciplines).Workflowsaredecomposed intoactivities.
> Activitiestransformtheartifactsfromoneworkflowto
another.Theoutputofoneworkflowbecomesthe
inputintothenext.
> Thefinalartifactisaworkingsoftwaresystemthat
satisfiestheinitialartifacts:thesystemrequirements.
UML2&UseCaseModels 1 ModelingwithUML2
18
TheOOSDHierarchy
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
19
Listingthe WorkflowsoftheOOSDProcess
Softwaredevelopmenthastraditionallyencompassedthe
followingworkflows:
> RequirementsGathering
> RequirementsAnalysis
> Architecture
> Design
> Implementation
> Testing
> Deployment
UML2&UseCaseModels 1 ModelingwithUML2
20
DescribingtheSoftwareTeamJobRoles
10
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
21
DescribingtheSoftwareTeamJobRoles
UML2&UseCaseModels 1 ModelingwithUML2
22
ExploringtheRequirementsGathering
Workflow
11
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
23
ActivitiesandArtifactsoftheRequirements
Gathering Workflow
UML2&UseCaseModels 1 ModelingwithUML2
24
ExploringtheRequirementsAnalysis
Workflow
12
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
25
ActivitiesandArtifactsoftheRequirements
Analysis Workflow
UML2&UseCaseModels 1 ModelingwithUML2
26
ExploringtheArchitectureWorkflow
13
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
27
ActivitiesandArtifactsoftheArchitecture
Workflow
UML2&UseCaseModels 1 ModelingwithUML2
28
ExploringtheDesignWorkflow
14
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
29
ExploringtheDesignWorkflow
UML2&UseCaseModels 1 ModelingwithUML2
30
ActivitiesandArtifactsoftheDesign
Workflow
15
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
31
ExploringtheImplementation,Testing,and
Deployment Workflows
UML2&UseCaseModels 1 ModelingwithUML2
32
ExploringtheImplementation,Testing,and
Deployment Workflows
16
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
33
ExploringtheBenefitsofModelingSoftware
> Theinceptionofeverysoftwareprojectstartsasanideain
someonesmind.
> Toconstructarealizationofthatidea,thedevelopment
team mustcreateaseriesofconceptualmodelsthat
transformthe ideaintoaproductionsystem.
UML2&UseCaseModels 1 ModelingwithUML2
34
ActivitiesandArtifactsofthe
Implementation,Testing,andDeployment
Workflows
17
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
35
WhatisaModel?
Amodelisasimplificationofreality.(Booch UMLUserGuide
page6)
> A modelisanabstractconceptualizationofsomeentity
(suchasabuilding)orasystem(e.g.software).
> Differentviewsshowthemodelfromdifferent perspectives.
UML2&UseCaseModels 1 ModelingwithUML2
36
WhyModelSoftware?
Webuildmodelssothatwecanbetterunderstandthesystem we
aredeveloping.(Booch UMLUserGuidepage6)
> Specifically,modelingenablesusto:
Visualizeneworexistingsystems
Communicatedecisionstotheprojectstakeholders
DocumentthedecisionsmadeineachOOSDworkflow
Specifythestructure(static)andbehavior(dynamic)
elementsofasystem
Useatemplateforconstructingthesoftwaresolution
18
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
37
InformationSystemsandITSystems
> AnITsystemisacomputerbasedsystemasystemthatprovides
informationneeded fortheexecutionofcertainbusiness
processes.
> Abusinessmodelisaframeworkforcreating economic,social,
and/orotherformsofvalue.
> Abusinessprocessisacollectionofrelated,structuredactivities
ortasksthatproduceaspecificserviceorproductforaparticular
customerorcustomers.
UML2&UseCaseModels 1 ModelingwithUML2
38
Definition:BusinessProcessManagement
BusinessProcessManagement(BPM)isdefinedasa
strategyformanagingandimprovingtheperformanceof
abusinessthroughcontinuous optimization ofbusiness
processesinaclosedloopcycle ofmodeling,execution,
andmeasurement.
Modeling
Execution
Measurement
19
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
39
Definition:BusinessProcess
Abusinessprocess isasetoflinkedactivities performed
bypeople andsystems thatdeliversomekindofvalue
throughaproductorprocesstointernalorexternal
customers.
UML2&UseCaseModels 1 ModelingwithUML2
40
RealWorldBusinessProcesses
OrganizationalUnits
Operations
Salesand
Marketing
Manu
facturing
Financeand
HR
OrderManagement
Processes
ProductConfiguration
WarrantyandReturnsManagement
Enterpriseinfrastructureservices
(portal,SOA,IDRS,LDAP,EAI,Email,IToperations)
20
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
41
RealWorldBusinessProcessManagement
OrderManagementProcess
Operations
Salesand
Marketing
Manu
facturing
Financeand
HR
Enterpriseinfrastructureservices
(portal,SOA,IDRS,LDAP,EAI,Email,IToperations)
UML2&UseCaseModels 1 ModelingwithUML2
42
Summary:BusinessProcessManagement
Strategy
Goals
Policies
Process
X
Systems
People
Information
21
30.10.2011
43
UML2&UseCaseModels 1 ModelingwithUML2
ElementsofaBPMNBusinessProcessModel
Gateway
Task
UserTask
Start
End
Activity1
Activity2
Event
SequenceFlow
UML2&UseCaseModels 1 ModelingwithUML2
44
OOSDasModelTransformations
> Softwaredevelopmentcanbeviewedasaseriesof
transformationsfromtheStakeholdersmentalmodelto
the actualcode:
22
30.10.2011
45
UML2&UseCaseModels 1 ModelingwithUML2
OOSDasModelTransformations
Book
title
Book
title:String
+turnPage(int)
Applicationdomain
Applicationdomainmodel
Softwaredomainmodel
UML2&UseCaseModels 1 ModelingwithUML2
46
DefiningtheUML
TheUnifiedModelingLanguage(UML)isagraphical languagefor
visualizing,specifying,constructing,and documentingthe
artifactsofasoftwareintensivesystem. (UMLv1.4pagexix)
> UsingtheUML,amodeliscomposedof:
Elements(thingsandrelationships)
Diagrams(builtfromelements)
Views(diagramsshowingdifferentperspectivesofa
model)
23
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
47
UMLElements
UML2&UseCaseModels 1 ModelingwithUML2
48
UMLDiagrams
24
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
49
UMLDiagramCategories
UML2&UseCaseModels 1 ModelingwithUML2
50
CommonUMLElementsandConnectors
> UMLhasafewelementsandconnectorsthatarecommon
acrossUMLdiagrams.Theseinclude:
Package
Note
Dependency
Stereotypes
25
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
51
PackagesandNotes
> Package
> Notes
UML2&UseCaseModels 1 ModelingwithUML2
52
DependencyandStereotype
26
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
53
WhatUMLIsandIsNot
UML2&UseCaseModels 1 ModelingwithUML2
54
HistoryofUML
27
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
55
UMLSubspecifications
UMLVersion2.0hasbeenformallydividedintothe
followingsubspecifications:
> Infrastructure:Coreofthearchitecture,profiles,and
stereotypes.
> Superstructure:Staticanddynamicmodelelements.
> ObjectConstraintLanguage(OCL):Aformallanguage
usedtodescribeexpressions onUMLmodels.
> DiagramInterchange:TheUMLinterchangeformatfor
diagrams.
UML2&UseCaseModels 1 ModelingwithUML2
56
28
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
57
ThefourlayerarchitectureofUML
UML2&UseCaseModels 1 ModelingwithUML2
58
Datatypes
UMLdistinguishesbetweenthefollowingdatatypes:
> Simpledatatypes(DataType)Asimpledatatypeisa
typewithvaluesthat havenoidentity(e.g.,money,
bankinginformation
> Primitivedatatypes(PrimitiveType)Aprimitivedata
typeisasimpledatatypewithoutstructures.
> UMLitselfdefinesthe followingprimitivedatatypes:
Integer:(Infinite)setofintegers:(...,2,1,0,1,2,...)
Boolean: true,false
UnlimitedNatural (Infinite)setofnaturalnumbers(0,
1,2,...)
29
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
59
Datatypes
> UMLitselfdefinesthe followingprimitivedatatypes:
EnumerationtypesEnumerationtypesaresimple
datatypeswithvalues thatoriginatefromalimitedset
ofenumerationliterals
UML2&UseCaseModels 1 ModelingwithUML2
60
Themetamodelofdatatypes
30
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
61
OverviewoftheUMLdiagrams
UML2&UseCaseModels 1 ModelingwithUML2
62
Stereotypes
> Stereotypesareformalextensionsofexistingmodel
elementswithintheUML metamodel,thatis,metamodel
extensions.
> Themodelingelementisdirectlyinfluenced bythe
semanticsdefinedbytheextension.
> Ratherthanintroducinganewmodel elementtothe
metamodel,stereotypesaddsemanticstoanexisting
modelelement.
31
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
63
MultipleStereotyping
> Severalstereotypescanbeusedtoclassifyonesingle
modeling element.
> Eventhevisualrepresentationofanelementcanbe
influencedbyallocating stereotypes.
> Moreover,stereotypescanbeaddedtoattributes,
operations,andrelationships.
> Further,stereotypescanhaveattributestostore
additionalinformation.
UML2&UseCaseModels 1 ModelingwithUML2
64
Notation
> Astereotypeisplacedbeforeorabovetheelementname
(e.g.,class name)andenclosedinguillemets (,).
> Thecharactersand,sometimes referredtoasangled
quotes,shouldnotbemistakenfordoubledgreaterthan,
>>,orsmallerthan,<<,characters.
> Noteveryoccurrenceofthisnotationmeansthatyouare
lookingatastereotype.
> KeywordspredefinedinUMLarealsoenclosedin
guillemets.
32
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
65
GraphicalSymbols
> Asanalternativetothispurelytextualnotation,special
symbols canbeused.
> Examples: entity,boundary,andcontrol
> Inaddition,toolsarefreetousespecialcolormarkingor
othervisualhighlighting
UML2&UseCaseModels 1 ModelingwithUML2
66
UMLStandardStereotypes
33
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
67
UMLStandardStereotypes
UML2&UseCaseModels 1 ModelingwithUML2
68
NonStandardUMLStereotypes
34
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
69
NonStandardUMLStereotypes
UML2&UseCaseModels 1 ModelingwithUML2
70
UMLTools
> UMLitselfisatool.YoucancreateUMLdiagramson
paper orawhiteboard.However,softwaretoolsare
availableto:
> ProvidecomputeraideddrawingofUMLdiagrams
> Support(orenforce)semanticverificationofdiagrams
> Providesupportforaspecificmethodology
> GeneratecodeskeletonsfromtheUMLdiagrams
> Organizeallofthediagramsforaproject
> Automaticgenerationofmodelingelementsfordesign
patterns,JavaPlatform,EnterpriseEdition(JavaEE
platform)components,andsoon
35
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
71
An Example:
Dice Game
UML2&UseCaseModels 1 ModelingwithUML2
72
AnExample
> Beforedivingintothedetailsofrequirementsanalysisand
OOA/D,thissectionpresentsabirdseyeviewofafewkey
stepsanddiagrams,usingasimpleexample
A "dice game"inwhichaplayerrollstwodie.
Ifthetotalisseven, theywin
Otherwise,theylose.
36
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
73
DefineUsecases
> Usecasesarenotanobjectorientedartifacttheyare
simplywrittenstories.
> However,theyareapopulartoolinrequirementsanalysis
andareanimportant partoftheUnifiedProcess.
UML2&UseCaseModels 1 ModelingwithUML2
74
DiceGameusecase
> PlayaDiceGame:Aplayerpicksupandrollsthedice.If
the dicefacevaluetotalseven,theywin;otherwise,they
lose.
37
30.10.2011
UML2&UseCaseModels 1 ModelingwithUML2
75
DefineaDomainModel
> Objectorientedanalysisisconcernedwithcreatinga
descriptionofthedomain fromtheperspectiveof
classificationbyobjects.
> Adecompositionofthedomain involvesanidentification
oftheconcepts,attributes,andassociationsthatare
considerednoteworthy.
UML2&UseCaseModels 1 ModelingwithUML2
76
DefineInteractionDiagrams
> Objectorienteddesignisconcernedwithdefining
softwareobjectsandtheircollaborations.
> Acommonnotationtoillustratethesecollaborationsis
theinteraction diagram.
38
30.10.2011
77
UML2&UseCaseModels 1 ModelingwithUML2
DefineInteractionDiagrams
:DiceGame
die1:Die
die2:Die
play()
roll()
fv1:=getFaceValue()
roll()
fv2:=getFaceValue()
78
UML2&UseCaseModels 1 ModelingwithUML2
DefineDesignClassDiagrams
> Inadditiontoadynamicviewofcollaboratingobjects
shownininteractiondiagrams, itisusefultocreatea
staticviewoftheclassdefinitionswithadesign class
diagram.
> Thisillustratestheattributesandmethodsoftheclasses.
DiceGame
die1:Die
die2:Die
play()
Die
1
faceValue:int
getFaceValue():int
roll()
39
30.10.2011
2
Creating
UseCaseDiagrams
?
?? ?
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
80
40
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
81
ProcessMap
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
82
ProcessMap
41
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
83
JustifyingtheNeedforaUseCaseDiagram
FollowingarereasonsaUseCasediagramisnecessary:
> AUseCasediagramenablesyoutoidentifyby
modelingthehighlevelfunctionalrequirements(FRs)
thatarerequiredtosatisfyeachusersgoals.
> Theclientsidestakeholdersneedabigpictureviewof the
system.
> Theusecasesformthebasisfromwhichthedetailed FRs
aredeveloped.
> Usecasescanbeprioritizedanddevelopedinorderof
priority.
> Usecasesoftenhaveminimaldependencies,which
enablesadegreeofindependentdevelopment.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
84
Usecasesandotherrequirements
FURPS
> Functionality
> Usability
> Reliability
> Performance
> Supportability
Use Cases
Designconstraints
> Operatingsystems
> Environments
> Compatibility
> Applicationstandards
Legalandregulatoryrequirements
> FederalCommunicationCommission
> FoodandDrugAdministration
> DepartmentofDefense
> CanadianStandardsAssociation
> EuropeanUnionDirective
42
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
85
Usecasesdrivesoftwaredevelopment
Implemented by
UseCaseModel
DesignModel
TestModel
Implementation Model
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
86
IdentifyingtheElementsofaUseCase Diagram
> AUseCasediagramshowstherelationshipsbetween
actors (roles)andthegoalstheywishtoachieve.
> Aphysicaljobtitlecanassumemultipleactors(roles).
43
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
87
IdentifyingtheElementsofaUseCase Diagram
> Thisdiagramillustratesanalternatestylethatexplicitly
showsanassociationbetweentheReceptionistactor
(role) andtheManageReservationusecase.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
88
Actors
Anactor:
> Modelsatypeofrolethatisexternaltothesystemand
interactswiththatsystem
> Canbeahuman,adevice,anothersystem,ortime
> Canbeprimaryorsecondary
Primary:Initiatesandcontrolsthewholeusecase
Secondary:Participatesonlyforpartoftheusecase
Asinglephysicalinstanceofahuman,adevice,orasystem
mayplaytheroleofseveraldifferentactors.
44
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
89
Actors
Thisiconrepresentsa Thisiconcan
humanactor(user)of represent anyactor,
butisusually usedto
the system.
represent external
systems,devices, or
time.
Thisiconrepresents
atimetrigger
mechanismthat
activatesausecase.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
90
Actors
Dkkan
Mteriye Sat Sistemi
Vergi
Dairesi
Ama: Vergileri
doru toplamak
Terminal
(kasa)
Sat nceleme
Sistemi
Kasa
Grevlisi
Mteri
45
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
91
UseCases
Ausecasedescribesaninteractionbetweenanactorand
the systemtoachieveagoal.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
92
SystemBoundary
> Theusecasesmayoptionallybeenclosedbyarectangle
that representsthesystemboundary.
Thesystemboundary
boxisoptional.
ThisequivalentUseCase
diagram showsthesystem
boundaryforclarity.
46
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
93
UseCaseAssociations
Ausecaseassociationrepresentstheparticipationofan
actor inausecase.(UMLv1.4spec.page357)
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
94
CreatingtheInitialUseCaseDiagram
> Oneoftheprimaryaimsoftheinitialmeetingwiththe
projectsbusinessowneristoidentifythebusiness
significant usecases.
Ausecasediagrammaybecreatedduringthemeeting.
Alternatively,thediagramscanbecreatedafterthe
meetingfromtextualnotes.
> Thenexttwoslidespresentsometextshowinganabstract
of theusecasespecifictopicsdiscussedduringthe
meeting.
47
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
95
CreatingtheInitialUseCaseDiagram
> Thebookingagent(internalstaff)mustbeabletomanage
reservationsonbehalf ofcustomerswhotelephoneoremail
withreservationrequests.Themajorityof theserequestswill
makeanewreservation,butoccasionallytheywillneedto
amendorcancelareservation.Areservationholdsoneormore
roomsofaroom typeforasingletimeperiod,andmustbe
guaranteedbyeitheranelectronic cardpaymentorthereceipt
ofapurchaseorderforcorporatecustomersand travelagents.
Thesepaymentguaranteesmustbesavedforfuturereference.
> AreservationcanalsobemadeelectronicallyfromtheTravel
Agentsystemand alsobycustomersdirectlyviatheinternet.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
96
CreatingtheInitialUseCaseDiagram
> Thereceptionistmustbeabletocheckincustomersarrivingatthe
hotel.This actionwillallocateoneormoreroomsoftherequested
type.Inmostcases,a furtherelectroniccardpaymentguaranteeis
required.
> Mostreceptionistswillbetrainedtoperformthebookingagenttasks
for customerswhoarrivewithoutabookingorneedtochangea
booking.
> Themarketingstaffwillneedtomanagepromotions(specialoffers)
basedona reviewofpastandfuturereservationstatistics.The
marketingstaffwill elaborateonthedetailedrequirementsina
subsequentmeeting.
> Themanagementneedsadailystatusreport,whichneedstobe
producedwhen thehotelisquiet.Thisactivityisusuallydoneat3
a.m.
48
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
97
CreatingtheInitialUseCaseDiagram
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
98
IdentifyingadditionalUseCases
> Duringthemeetingwiththebusinessowner,youwill
typicallydiscover10to20percentoftheusecases
neededfor thesystem.
> Duringthemeetingwiththeotherstakeholders,youwill
discovermanymoreusecasetitlesthatyoucanaddto
the diagram.
> Forexample:
MaintainRooms
Create,Update,andDelete
MaintainRoomTypes
Create,Update,andDelete
49
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
99
IdentifyingadditionalUseCases
> Thetimeofdiscoverydependsuponthedevelopment
process.
> Inanoniterativeprocess:
Youideallyneedtodiscoveralloftheremaininguse
casetitles,bringingthetotalto100percent.
However,thisisaresourceintensivetaskandis rarely
completelyaccurate.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
100
IdentifyingadditionalUseCases
> Inaniterative/incrementaldevelopmentprocess,an
optionisto:
Discoveratotalof80percentoftheusecasetitlesin
thenextfewiterationsfor20percentoftheeffort. This
isjustoneofthemanyusesofthe80/20 rule.
Discovertheremaining20percentofusecasetitles in
thelateriterationsforminimaleffort.
> Thisprocessworkswellwithsoftwarethatisbuiltto
accommodatechange.
50
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
101
Workflowofusecasemodeling
Iterate
DescribetheUseCases
SeekActors
SeekUseCases
> SeekActors:Nameanddescribe
> SeekUseCases:
ForeachactoraskWhat'dyouliketousethesystemfor?
> NameandbrieflydescribeeachUseCase
> Iteratebasedonpreviousfindings
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
102
Findingactors
> Actorsareendpointsforcommunication,oraddsome
information.(Abuttonisnotanactorifithasnoother
functionthantoinformthesystemthatsomeonehas
pressedit.)
> Concentrateontheactiveactors.TheygiveyoutheUse
Cases.
> Remember:
Actorsrepresentroles!
Actorsarealwaysoutsidethesystem!
> Examples:users,othersystems,externalhardwareetc.
51
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
103
Findingusecases
> BlackBoxviewofthesystem
> Ausecaseshouldsatisfyamajorgoalfortheactor
> Putyourselfinthesituationofan(active)actor.Ask
yourself:WhatdoIwanttodowiththesystem?
> Nameeachusecaseusingaverb/nouncombination
> TheUseCaseshallrepresentacompletefunctionalityfor
theinitiatingactor.Donotdivideitintopartsthatmustbe
usedtogethertoaddsomevaluetotheactor
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
104
Usecasedrawingguide
> Usedifferentusecasediagramstoseparateusecasesin
alogicalway
> Groupusecasesthatareinitiatedbycommonactors
> Donotputunrelatedusecasesinthesamediagram
> Limitthenumberofusecasesperdiagramto10
52
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
105
UseCaseElaboration
> Duringthemeetingwiththeotherstakeholders,you
will discover manymoreusecasesthatyoucanaddto
thediagram.
> Youmightalsofindthatsomeusecasesaretoohigh
level.Inthis case,youcanintroducenewusecasesthat
separatethe workflows.
Example:
Becomes:
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
106
ExpandingHighLevelUseCases
> Typically,managinganentityimpliesbeingableto
Create,(Retrieve),Update,andDeleteanentity(so called,
CRUDoperations).Otherkeywordsinclude:
Maintain
Process
> Otherhighlevelusecasescanoccur.Identifytheseby
analyzingtheusecasescenariosandlookfor significantly
divergentflows.
> Ifseveralscenarioshaveadifferentstartingpoint,these
scenariosmightrepresentdifferentusecases.
53
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
107
ExpandingHighLevelUseCases
> Theexpandeddiagram:
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
108
AnalyzingInheritancePatterns
InheritancecanoccurinUseCasediagramsforbothactors
andusecases:
> Anactorcaninheritalloftheusecaseassociationsfrom
theparentactor.
> Ausecasecanbesubclassed intomultiple,specialized use
cases.
54
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
109
ActorInheritance
> Anactorcaninheritalloftheusecaseassociationsfrom
the parentactor.
> Thisinheritanceshouldbeusedonlyifyoucanapplythe
is akindofrulebetweentheactors.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
110
UseCaseSpecialization
Ausecasecanbesubclassed intomultiple,specializeduse
cases:
> Usecasespecializationsareusuallyidentifiedby
significantvariationsintheusecasescenarios.
> Ifthebaseusecasecannotbeinstantiated,youmust
markitasabstract.
55
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
111
AnalyzingUseCaseDependencies
Usecasescandependonotherusecasesintwoways:
> Oneusecase(a)includesanotherusecase(i).
Thismeansthattheoneusecase(a)requiresthe
behavioroftheotherusecase(i)andalways performs
theincludedusecase.
> Oneusecase(e)canextendanotherusecase(b).
Thismeansthattheoneusecase(e)can(optionally)
extendthebehavioroftheotherusecase(b).
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
112
TheincludeDependency
> Theincludedependencyenablesyoutoidentifybehaviors
of thesystemthatarecommontomultipleusecases.
> Thisdependencyisdrawnlikethis:
56
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
113
TheincludeDependency
> Anincluderelationshipisusedtointegrateausecaseinto
anotherusecase,thus becomingalogicalpartofthatuse
case.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
114
TheincludeDependency
Identifyingandrecordingcommonbehavior:
> Reviewtheusecasescenariosforcommonbehaviors.
> GivethisbehavioranameandplaceitintheUseCase
diagramwithanincludedependency.
57
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
115
TheincludeDependency
Identifyingbehaviorassociatedwithasecondaryactor:
> Reviewtheusecasescenariosforsignificantbehavior that
involvesasecondaryactor.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
116
TheincludeDependency
> Splitthebehaviorthatinteractswiththissecondary actor.
GivethisbehavioraUseCasetitle,andplaceitin theUse
Casediagramwithanincludedependency.
58
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
117
TheextendDependency
> Theextenddependencyenablesyoutoidentify behaviors
of thesystemthatarenotpartofthe primaryflow,but
existin alternatescenarios.
> Thisdependencyisdrawnlikethis:
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
118
TheextendDependency
Identifyingandrecordingbehaviorsassociatedwithan
alternateflowofausecase:
> Reviewtheusecasescenariosforsignificantand cohesive
sequencesofbehavior.
> GivethisbehavioranameandplaceitintheUseCase
diagramwithaextenddependency.
59
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
119
ACombinedExample
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
120
extendorinclude
60
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
121
PackagingtheUseCaseViews
> Itshouldbeapparentthatanynontrivialsoftware
developmentwouldneedmoreusecasesthancouldbe
viewedatonetime.Therefore,youneedtobeableto
manage thiscomplexity.
> Onewayofmanagingthiscomplexityistobreakdownthe
usecasesintopackages.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
122
PackagingtheUseCaseViews
61
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
123
PackagingtheUseCaseViews
> Youcanlookinsideeachpackagetorevealthedetailed
content.
> Ausecaseelementmayexistinmultiplepackages, where
itparticipatesinmultipleviews.
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
124
PackagingtheUseCaseViews
> Adiagramconsistsofanareawithinarectangleanda
headerintheupperleftcorner.Thediagramheader
shows thediagramtype(optional),thediagramname
(mandatory),andparameters (optional).
62
30.10.2011
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
125
PackagingtheUseCaseViews
UML2&UseCaseModels 2 CreatingUseCaseDiagrams
126
TheMetamodel forUsecasesandActors
63
30.10.2011
3
Creating
Use Case Scenarios
and Forms
128
ProcessMap
64
30.10.2011
129
BlackBoxUseCases
> Blackboxusecasesarethemostcommonand
recommendedkind;
> Theydonot describetheinternalworkingsofthesystem,
itscomponents,ordesign.
> Thesystemisdescribedashavingresponsibilities,whichis
acommonunifying metaphoricalthemeinobject
orientedthinking
Blackboxstyle
Not
Thesystemrecordsthesale. Thesystemwritesthesaletoadatabase.
...or(evenworse):
ThesystemgeneratesaSQLINSERT
statementforthesale...
130
FormalityTypes
> Usecasesarewrittenindifferentformats,dependingon
need.Inadditiontothe blackboxversuswhitebox
visibilitytype,usecasesarewritteninvarying degreesof
formality:
briefterseoneparagraphsummary,usuallyofthe
mainsuccessscenario.
casualinformalparagraphformat.Multiple
paragraphsthatcovervariousscenarios.
fullydressedthemostelaborate.Allstepsand
variationsarewrittenin detail,andthereare
supportingsections,suchaspreconditionsandsuccess
guarantees.
65
30.10.2011
131
Theusecases.org Format
> Variousformattemplatesareavailableforfullydressed
usecases.
> However,perhaps themostwidelyusedandshared
formatisthetemplateavailableat www.usecases.org.
132 P
Analysis
UML2&UseCaseModels 3 CreatingUC Scenarios&Forms
Usecasedescription
TheUseCaseusuallycontainsthefollowingcomponents:
> Name
Averb/nounthatsatisfiesamajorgoalfortheactor
> Description
Onesentencedescribingwhatthisusecaseisabout
> PreConditions
Condition(s)whichmustbesatisfiedbeforetheusecasecantakeplace
> PostConditions
Thestateinwhichthesystemwillbeattheendoftheusecase
> CourseofAction
Describesthemostconventionalflowofeventsthroughtheusecase
> AlternativeFlows
Describelesscommonflowsthroughtheusecase
> ExceptionFlows
Describeflowswhereerrorshaveoccurredandhowtorecover
66
30.10.2011
133
TheTwoColumnVariation
> Somepreferthetwocolumnorconversationalformat,
whichemphasizesthe factthatthereisaninteraction
goingonbetweentheactorsandthesystem.
> It wasfirstproposedbyRebeccaWirfsBrock,andisalso
promoted byConstantineandLockwoodtoaidusability
analysisandengineering.
134
TheTwoColumnVariation
67
30.10.2011
135
TheBestFormat?
> Thereisntonebestformat;someprefertheonecolumn
style,somethetwocolumn.
> Sectionsmaybeaddedandremoved;headingnamesmay
change.
> Noneof thisisparticularlyimportant;thekeythingisto
writethedetailsofthemain successscenarioandits
extensions,insomeform.
136
RecordingUseCaseScenarios
> AUseCasescenarioisaconcreteexampleofausecase.
> AUseCasescenarioshould:
Beasspecificaspossible
Nevercontainconditionalstatements
Beginthesamewaybuthavedifferentoutcomes
Notspecifytoomanyuserinterfacedetails
Showsuccessfulaswellasunsuccessfuloutcomes(in
differentscenarios)
> UseCasescenariosdriveseveralotherOOADworkflows.
68
30.10.2011
137
SelectingUseCaseScenarios
> Whileitisidealtohavemultiplescenariosforalluse
cases, doingsowouldtakealotoftime.Therefore,you
canselect appropriatescenariosbythefollowingcriteria:
Theusecaseinvolvesacomplexinteractionwiththe
actor.
Theusecasehasseveralpotentialfailurepoints,such
asinteractionwithexternalsystemsoradatabase.
> Therearetwotypesofscenarios:
Primary(Happy)scenariosrecordsuccessfulresults.
Secondary(Sad)scenariosrecordfailureevents.
138
WritingaUseCaseScenario
AUseCasescenarioisastorythat:
> Describeshowanactorusesthesystemandhowthe
systemrespondstotheactionsoftheactor.
> Hasabeginning,amiddle,andanend.
69
30.10.2011
139
PrimaryUseCaseScenario:Example
> Thebeginning:
Theusecasebeginswhenthebookingagentreceivesa
request tomakeareservationforroomsinthehotel.
140
PrimaryUseCaseScenario:Example
> Themiddle:
Thebookingagententersthearrivaldate,thedeparture
date, andthequantityofeachtypeofroomthatis
required.The bookingagentthensubmitstheentered
details.Thesystem findsroomsthatwillbeavailable
duringtheperiodofthe reservationandallocatesthe
requirednumberandtypeof roomsfromtheavailable
rooms.Thesystemrespondsthatthe specifiedroomsare
available,returnstheprovisional reservationnumber,
andmarksthereservationasheld.The bookingagent
acceptstheroomsoffered.
70
30.10.2011
141
PrimaryUseCaseScenario:Example
> Moreofthemiddle:
Thebookingagentselectsthatthecustomerhasvisited
oneof thehotelsinthisgroupbefore,andentersthezip
codeand customername.Thesystemfindsandreturnsa
listofmatching customerswithfulladdressdetails.The
bookingagentselects oneofthecustomersasbeingthe
validcustomer.Thesystem assignsthiscustomertothe
reservation.Thebookingagent performsapayment
guaranteecheck.Thischeckissuccessful.
142
PrimaryUseCaseScenario:Example
> Theend:
Thesystemassignsthepaymentguaranteetothe
reservation andchangesthestateofthereservationto
confirmed.The systemreturnsthereservationIDand
bookingdetails.
71
30.10.2011
143
SecondaryUseCaseScenario:Example
> Thebeginning:
Theusecasebeginswhenthebookingagentreceivesa
request tomakeareservationforroomsinthehotel.
> Themiddle:
Thebookingagententersthearrivaldate,thedeparture
date, andthequantityofeachtypeofroomthatis
required.The bookingagentthensubmitstheentered
details.Thesystem respondsthattherearenorooms
availableofanytypeforthe daterangespecifiedinthe
request.
> Theend:
Theusecaseends.
144
SupplementarySpecifications
> Someoftheprojectinformationthatyougathercannot
be storedwiththeusecasesbecausethisinformation
needstobe sharedbyseveralusecases.
> Thisadditionalinformationcanbedocumentedina
SupplementarySpecificationDocument,whichoften
contains:
NFRs
ProjectRisks
ProjectConstraints
GlossaryofTerms
72
30.10.2011
145
NonFunctionalRequirements(NFRs)
> Nonfunctionalrequirements(NFRs)definethe qualitative
characteristicsofthesystem.Asinan animal,theNFRs
describestrength,speed,andagility oftheinternal
featuresoftheanimal.Howfastcanthe animalmove?
Howmuchweightcantheanimalcarry?
> AnyadverbialphrasecanbeanNFR.
146
NFRs:Examples
> NFR1:Thesystemmustsupport200simultaneoususers
intheWebapplication.
> NFR2:Theprocessforcompletinganyreservation
activitymusttaketheaverageusernomorethan10
minutestofinish.
> NFR3:Thecapacityofreservationrecordscouldgrowto
2,600permonth.
> NFR4:TheWebaccessshouldusetheHTTPStransport
layerwhencriticalcustomerinformationisbeing
communicated.
> NFR5:Thenumericalaccuracyofallfinancialcalculations
(forexample,reportsandcustomerreceipts)should
followa2significantdigitprecisionwithstandard
roundingofintermediateresults.
73
30.10.2011
147
NFRs:Examples
> NFR6:TheSystemmustbeavailable7by24by365.
However,theapplicationscanbeshutdownfor
maintenanceonceaweekforonehour.Thismaintenance
activityshouldbescheduledbetween3a.m.and6a.m.
> NFR7:Basedonhistoricalevidence,thereare
approximately600reservationspermonthpe property.
> NFR8:Thesearchforavailableroomsmusttakenolonger
than30seconds.
148
GlossaryofTerms
> TheGlossaryofTermsdefinesbusinessorITtermsthat
will beusedintheproject.
> Thisisalivingdocument,whichshouldbeappendedwith
newterms,oramendedifatermisfoundtobeincorrect
or needsredefinition.
74
30.10.2011
149
GlossaryofTerms:Examples
150
DescriptionofaUseCaseForm
> AUseCaseformprovidesatooltorecordthedetailed
analysisofasingleusecaseanditsscenarios.
75
30.10.2011
151
DescriptionofaUseCaseForm
152
DescriptionofaUseCaseForm
76
30.10.2011
153
DescriptionofaUseCaseForm
> Somemethodologiesrecommendmoreorlessanalysisof
the usecases.TheAnalysisworkflowpresentedinthis
module tendstobemoredetailed.
> UseCaseformsarenotstandard.Therearedifferent
styles thatcanbeusedtocreateaUseCaseform.
154
CreatingaUseCaseForm
StepstodeterminetheinformationforUseCaseform:
1. Determineabriefdescriptionfromtheprimary
scenarios.
2. Determinetheactorswhoinitiateandparticipateinthis
usecasefromtheUseCasediagrams.
3. Determinethepriorityofthisusecasefromdiscussions
withthestakeholders.
4. Determinetheriskfromscenariosandfromdiscussions
withthestakeholders.
5. DeterminetheextensionpointsfromtheUseCase
diagrams.
6. Determinethepreconditionsfromthescenarios.
7. Determinethetriggerfromthescenarios.
77
30.10.2011
155
CreatingaUseCaseForm
8. Determinetheflowofeventsfromtheprimary(happy)
scenarios.
9. Determinethealternateflowsfromthesecondary(sad)
scenarios.
10. Determinethebusinessrulesfromscenariosand from
discussionswithstakeholders.
11. Determinethepostconditions.
12. DeterminethenewNFRsfromdiscussionswith
stakeholders.
13. Addnotesforinformationgatheredfromdiscussions
withstakeholdersthatdoesnotfitintothestandard
sectionsoftheform.
156
FillinValuesfortheUseCaseForm
> Fillinelementsderivedfromstakeholdersandprevious
artifacts
78
30.10.2011
157
FillinValuesfortheUseCaseForm
158
FillinValuesfortheUseCaseForm
79
30.10.2011
159
FillinValuesfortheAlternateFlowof Events
> Determinethealternateflowsfromthesecondary
scenarios andremainingprimaryscenarios:
> Performadifferenceanalysisbetweenthescenarioused
forthemainflowandeachoftheotherscenarios(in
turn).
> Thealternateflowsarethestepsthataredifferent
betweenthescenariousedforthemainflowandeach of
theotherscenarios.
160
FillinValuesfortheAlternateFlowof Events
80
30.10.2011
161
FillinValuesfortheAlternateFlowof Events
162
FillinValuesfortheBusinessRules
81
30.10.2011
AppendixA
Improving
RequirementQuality
Objectives
Whenyoucompletethismodule,youshouldbeableto:
Knowthebestpracticewhenwritingrequirements
Avoidcommonpitfalls
Critiqueindividualrequirements
82
30.10.2011
Characteristicsofagoodrequirement
Design-free
Consistent
Complete
Individual
Verifiable
Identified
Modular
Positive
Correct
Unique
Clear
Traceable
Feasible
Positive
Modular
Traceable
Consistent
Feasible
Clear
Correct
Unique
Design-free
Verifiable
Complete
Individual
Identified
Anatomyofagoodstakeholderrequirement
Usertype
Performancecriteria
Positiveendresult
TheInternetusershallbeabletoaccesstheircurrentaccount
balanceinlessthan5seconds.
Measurable
Thechallengeistoseekouttheusertype,endresult,andsuccess
measureineveryrequirementthatyoudefine.
r572
83
30.10.2011
Writingpitfallstoavoid
or
andsoon
shallincludebutnotbelimitedto
Example:
Thepilotorcopilotshallalsobeabletohearor
seeavisibleoraudiblecautionorwarningsignal
incaseofemergency,hazard,andsoon
Improvements:
Ambiguity
Writingpitfallstoavoid(cont.)
Theusershallbenotifiedwithalowbattery
warninglamplightwhenthevoltagedropsbelow
3.6Voltsandthecurrentworkspaceorinputdata
shallbesaved.
Improvements:
Ambiguity
84
30.10.2011
Writingpitfallstoavoid(cont.)
Thehomeownershallalwayshearthesmokedetector
alarmwhensmokeisdetectedunlessthealarmisbeing
testedorsuppressed.
Improvements:
Ambiguity
Writingpitfallstoavoid(cont.)
Long sentences
Arcane language
References to unreachable documents
Example:
Improvements:
Providedthatthedesignatedinputsignalsfromthe
specifieddevicesarereceivedbytheuserinthecorrect
orderwherethesystemisabletodifferentiatethe
designators,theoutputsignalshallcomplywiththe
requiredframeworkofsection3.1.5toindicatethe
desiredinputstate.
Ambiguity
85
30.10.2011
Writingpitfallstoavoid(cont.)
Example:
Theusershallbeabletoviewthecurrentlyselected
channelnumber,whichshallbedisplayedin14ptSwiss
typeonanLCDpaneltestedtoFederalRegulation
Standard56789andmountedwithshockproofrubber
washers.
Improvements:
Ambiguity
Writingpitfallstoavoid(cont.)
Specify design envelope for level required
TheantennashallbecapableofreceivingFMsignals,
usingacoppercorewithnyloncoveringanda
waterproofhardenedrubbershield
Improvements:
Ambiguity
86
30.10.2011
Writingpitfallstoavoid(cont.)
Wish lists
Vague about which stakeholder is speaking
usually , generally , often ,
normally , typically
Example:
Thealarmsystemwillprobablyhavetooperateover
normalphonelines.
Improvements:
Ambiguity
Writingpitfallstoavoid(cont.)
Qualitative terms
User friendly, highly versatile, and flexible
To the maximum extent, approximately, as much as
possible, with minimal impact.
Example:
Theusershallbeprovidedwithauserfriendlyfront
end.
Improvements:
Ambiguity
87
30.10.2011
Writingpitfallstoavoid(cont.)
Suggestions will be ignored by developers
Example:
Thenetworkmanagermaybeprovidedwithpossible
networkcontentionpoints,andshouldinstantaneously
reroutethetraffic.
Improvements:
Ambiguity
Writingpitfallstoavoid(cont.)
Example:
Thenetworkmanagershallhandleallunexpected
errorswithoutcrashingthesystem,andbefullycapable
ofmanagingfuturenetworkconfigurations.
Improvements:
Ambiguity
88
30.10.2011
AppendixB
PracticalExercise
UML2&UseCaseModels B PracticalExercise
178
1. TheATMusershallbeallowedtowithdrawmoneyandbe
abletomakeapaymenttoanyoutstandingloan.
2. TheATMusershallbeallowedtowithdrawuptothecurrent
accountbalanceamountintheselectedaccount,the
maximumamountavailableforwithdrawal,oruptothe
maximumlineofcreditfortheaccount.
3. TheATMshallbeabletodisplayallpromptsintheEnglish
languageandotherlanguagesincluding,butnotlimitedto,
Spanish,French,andGerman.
4. ThepriceoftheATMshallnotexceed$30,000andallowthe
maintainertorequestanotificationbepostedtoindicateto
allATMusersthatthesystemisabouttobecome
unavailable.
5. OftenanATMusermayusuallyperformmultipletransactions
duringasingleaccountsession.
89
30.10.2011
179
UML2&UseCaseModels B PracticalExercise
6. TheATMshallprobablyhavetoaccessthebankprovider
systemtodeterminewhattransactionsarevalidforthis
user.
7. TheATMusermayprobablywishtomakeapaymentonany
outstandingloan.
8. TheATMshallbeabletoprovidefoolproofidentificationof
allATMuserstopreventanyunauthorizedaccesstoausers
account.
9. TheATMusershallbeabletoviewthecurrentaccount
balanceafteranupdatewithin5seconds.
10. TheATMshallnotifytheuseroftheclosestATMtothe
currentunitintheeventthatthecurrentunitisoutofcash.
180
UML2&UseCaseModels B PracticalExercise
Foreachpotentialusecase,determinewhetherit
isausecase
Have system 100% available
during regular business hours
Login
Transfer funds
Make reservation
Place order
Support IE7.0
90
30.10.2011
UML2&UseCaseModels B PracticalExercise
181
TheprimaryUseCases fortheSampleBankATM
UML2&UseCaseModels B PracticalExercise
182
SupportingUseCases fortheSampleBankATM
Refill and Service the Machine
ATM Engineer
Service
Administrator
91
30.10.2011
183
UML2&UseCaseModels B PracticalExercise
renciOtomasyon
Sistemi
<<actor>>
Veritaban
Gekayt
<<extend>>
Danman
Snflistesi
gster
Sistemegiri
<<include>>
<<include>>
Dersekayt
Kullanc
retmen
renci
AppendixC
LectureNotesinTurkish
92
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
185
UMLNedir
> UMLyazlmsistemininnemlibileenlerinitanmlamay,
tasarlamayvedokmantasyonunusalayangrafikselbir
modellemedilidir
> Yazlmgelitirmesrecindekitmkatlmclarn(kullanc,i
zmleyici,sistemzmleyici,tasarmc,programc,...)
gzylemodellenmesineolanaksalar,
> UMLgsteriminesneyedayalyazlmmhendisliinedayanr.
UML2&UseCaseModels C LectureNotesinTurkish
186
Ortakbirdil
>
>
>
>
dx
Tmmhendisler simgesininanlamnbilir
Simgebasitolsadaarkasndakianlamkarmakvederindir!
:Terssekiz?
Kapasite?
C
93
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
187
UMLinKazanmlar
> Yazlmsistemiherhangibirkodyazmadannce
profesyonelcetasarlanrvedokmantasyonuyaplr
> Yenidenkullanlabilirkodparalar kolaylkla ayrtedilirve en
yksekverimlekodlanr
> Dahadkgelitirmemaliyeti
> Tasarmdakimantksal boluklar tasarmizimlerinde
kolaylklasaptanabilir
UML2&UseCaseModels C LectureNotesinTurkish
188
UMLinKazanmlar2
> Dahaazsrpriz yazlmlarbeklendiimizekildedavranrlar
> Overalldesignwilldictatethewaysoftwareisdeveloped tm
tasarmkararlarkodyazmadanverilir
> UMLresmintamamngrmemizisalar
> Morememoryandprocessorefficientcodeisdeveloped
> Sistemdedeiiklikyapmaykolaylatrr
94
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
189
UMLinKazanmlar3
> Lessre/learningofthesystemtakesplace
> Diagramswillquicklygetanyotherdeveloperuptospeed
> Programclararasndadahaetkinbiriletiimeolanaksalar
UML2&UseCaseModels C LectureNotesinTurkish
190
95
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
191
Hatrlatma
> SreYnetimikonusunaksabirgeridnyapalm:
> elaleModeli
> VModeli
> SpiralModel
> ArtmsalveYinelemeliModeller
UML2&UseCaseModels C LectureNotesinTurkish
192
elaleModeli
Kkprojeleriinuygun
Birkaaylkprojeler
BigBangEtkisi
96
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
193
elaleModelininYitimleri
Risk
Hatay
Dzeltmenin
Maliyeti
Zaman
UML2&UseCaseModels C LectureNotesinTurkish
194
SprilModel
97
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
195
SpiralModelin Kazanmlar
>
>
>
>
>
>
Takmyazlmyaamevriminintmaamalarnakatlr,
Ksasredevedzgnaralklarlageribeslemealnr,
Risklibileenlerncedenkestirilebilirvegereklenebilir,
inleivekarmaklncedenkefedilebilir,
alanbirsrmnvarltakmnmoraliniyksektutar,
Projenindurumudahakesinolarakdeerlendirilebilir.
UML2&UseCaseModels C LectureNotesinTurkish
196
RUP
> RUPyinelemli,artmsal,mimarimerkezli,riskgdml,
kullanmsenaryolarnadayalbiryazlmgelitirmesreci
modelidir.
> RUPiyitanmlanmveyaplandrlmbiryazlmsrecidir:
KiminNedensorumluolduu,ilerinNaslveNeZaman
yaplacaakatanmlanr.
98
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
197
Customer
(f rom Actors)
Barrow Book
(from <Use Case Name>)
aktr
UML2&UseCaseModels C LectureNotesinTurkish
198
99
30.10.2011
199
UML2&UseCaseModels C LectureNotesinTurkish
KullanmSenaryosuemas
> Biraktrbirdenfazlakullanm
senaryosundayeralabilir
> Aynsenaryodabirdenfazlaaktr
olabilir.
Start Up
(from <Use Case Name>)
Shutdown
Operator
(f rom Actors)
Produce Report
(from <Use Case Na me >)
Order System
(f rom Actors)
200
UML2&UseCaseModels C LectureNotesinTurkish
Actor
>
>
>
>
>
Aktreylemibalatannesnedir.
Aktrnesnesimutlakabirkiiolmakzorundadeil.
Soyutbirnesneolabilir:zaman,tarih,...
Aktrsistemindndanbirnesneolabilir
KullanlanSimge:
Start Up
(from <Use Case Name>)
Operator
(f rom Actors)
> Heraktrenazbirsenaryoile
ilikilendirilmelidir:
Operator
(f rom Actors)
Shutdown
(from <Use Case Name>)
Produce Report
(from <Use Case Name>)
100
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
201
UML2&UseCaseModels C LectureNotesinTurkish
202
znrlkNeOlmal?
> Kullanmsenaryosununkullanmnailikinbirrnek:ATM
cihazndanparaekmek
Enter Card
(from <Use Case Name>)
Enter PIN
(from <Use Case Name>)
Remove Card
(from <Use Case Name>)
Customer
(f rom Actors)
Select Amount
(from <Use Case Name>)
Confirm Amount
(from <Use Case Name>)
Take Receipt
(from <Use Case Name>)
101
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
203
zm
> Kullanm senaryosu, aktr iin bir amac yerine getirmelidir.
Ama:paraekmek
Customer
(f rom Actors)
Withdraw Money
(from <Use Case Name>)
UML2&UseCaseModels C LectureNotesinTurkish
Check Balance
(from <Use Case Name>)
Customer
(f rom Actors)
204
Withdraw Mone y
(from <Use Case Name>)
102
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
205
UML2&UseCaseModels C LectureNotesinTurkish
206
Withdraw Money
Update Accoun t
Custom er
<<extend>>
(f rom Actors)
Protect Overdraft
(f rom < Use Case Name>)
103
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
207
UML2&UseCaseModels C LectureNotesinTurkish
208
KullanmSenaryosuAnlatm
Standartbirformatyok.
Herfirmakendineuygunbirformatbelirleyebilir.
Senaryo:Senaryoad
zettantm:Senaryonunksabirtanmlamas
nkoullar:Senaryonunbalamasiinsalanmas
gerekenkoullar
Sonukoullar:Senaryonunsonundanelerolduu
tanmlanr
AnaAk: Sistemiinolaansenaryodurumunda
gerekleenetkileimlerinbirlistesiverilir.
AlternatifAk: Olasalternatifetkileimlerintanmlanmas
SradAk: Beklenmeyenyadangrlmeyenolaylarn
gerekletiisenaryolartanmlanr
104
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
209
KullanmSenaryolarnnYazlmas
AktrlerinBelirlenmesi:
Sistemintemelilevlerinikimkullanacak?
Sisteminbakmnveiletiminikimyapacak?
Sistemhangicihazlarkullanacak?
Dierhangisistemlerleetkileimdebulunacak?
Sisteminklarnkimleriilgilendirir?
UML2&UseCaseModels C LectureNotesinTurkish
210
105
30.10.2011
UML2&UseCaseModels C LectureNotesinTurkish
211
ModelCASEToolkullanlarakbilgisayardaoluturulur
106