Analysis modeling & scenario based modeling

9,693 views 36 slides May 10, 2020
Slide 1
Slide 1 of 36
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36

About This Presentation

This slide describes the concepts are Analysis Modeling & Scenario-Based Modeling in Object-oriented software engineering


Slide Content

ANALYSIS

Modeling
•Wecreatemodelstogainabetterunderstandingofthe
actualentitytobebuilt.Whentheentityisaphysical
thing(e.g.,abuilding,aplane,amachine),wecanbuilda
modelthatisidenticalinformandshapebutsmallerin
scale.
•Insoftwareengineeringwork,twoclassesofmodelscan
becreated:requirementsmodelsanddesignmodels.
Requirementsmodels(alsocalledanalysismodels)
•Representcustomerrequirementsbydepictingthe
softwareinthreedifferentdomains:theinformation
domain,thefunctionaldomain,andthebehavioral
domain.
Designmodelsrepresentcharacteristicsofthesoftware
thathelppractitionerstoconstructiteffectively:the
architecture,theuserinterface,andcomponent-level
detail.

Requirements Modeling/
Analysis Modeling
•Requirementsmodelinginsoftwareengineeringis
essentiallytheplanningstageofasoftwareapplicationor
system.
•Generallytheprocesswillbeginwhenabusinessoranentity,
forexampleaneducationalinstitution,approachesa
softwaredevelopmentteamtocreateanapplicationor
systemfromscratchorupdateanexistingone.
•Requirementsmodelingcomprisesseveralstagesor
'patterns':scenario-basedmodeling,datamodeling,flow-
orientedmodeling,class-basedmodelingandbehavioral
modeling.
•Eachofthesestages/patternsexaminesthesameproblem
fromadifferentperspective.

Why Requirements Modeling/
Analysis Modeling?
•Attempttoproducethesimplestmodelthatwill
describetheproblemorthesoftware.
•Buildmodelsinawaythatmakesthemamenableto
change.
•Beabletostateanexplicitpurposeforeachmodel
thatiscreated:Everytimeyoucreateamodel,ask
yourselfwhyyou’redoingso.
•Adaptthemodelsyoudeveloptothesystemat
hand.
•Getfeedbackassoonasyoucan.

Requirements Modeling principles /
Analysis Modeling principles.
•Principle1.Theinformationdomainofa
problemmustberepresentedand
understood.
–Theinformationdomainencompassesthedata
thatflowintothesystem(fromendusers,other
systems,orexternaldevices),thedatathatflow
outofthesystem(viatheuserinterface,network
interfaces,reports,graphics,andothermeans),
andthedatastoresthatcollectandorganize
persistentdataobjects(i.e.,datathatare
maintainedpermanently).

Requirements Modeling principles /
Analysis Modeling principles.
•Principle2.Thefunctionsthatthesoftware
performsmustbedefined.
–Softwarefunctionsprovidedirectbenefittoendusers
andalsoprovideinternalsupportforthosefeatures
thatareuservisible.Somefunctionstransformdata
thatflowintothesystem.Inothercases,functions
effectsomelevelofcontroloverinternalsoftware
processingorexternalsystemelements.Functionscan
bedescribedatmanydifferentlevelsofabstraction,
rangingfromageneralstatementofpurposetoa
detaileddescriptionoftheprocessingelementsthat
mustbeinvoked.

Requirements Modeling principles /
Analysis Modeling principles.
•Principle 3. The behavior of the software (as a
consequence of external events) must be
represented.
–The behavior of computer software is driven by its
interaction with the external environment. Input
provided by end users, control data provided by an
external system, or monitoring data collected over a
network all cause the software to behave in a specific
way.

Requirements Modeling principles /
Analysis Modeling principles.
•Principle4.Themodelsthatdepictinformation,
function,andbehaviormustbepartitionedina
mannerthatuncoversdetailinalayered(or
hierarchical)fashion.
•Principle 5. The analysis task should move from
essential information toward implementation
detail.

What is Requirements analysis /
Analysis modeling
•Requirementsmodelingusesacombinationoftextand
diagrammaticformstodepictrequirementsinawaythat
isrelativelyeasytounderstand,andmoreimportant,
straightforwardtoreviewforcorrectness,completeness,
andconsistency.
•Whodoesit?
–Asoftwareengineer(sometimescalledan“analyst”)
buildsthemodelusingrequirementselicitedfromthe
customer.
•Whyisitimportant?
–Tovalidatesoftwarerequirements,youneedto
examinethemfromanumberofdifferentpointsof
view.

Analysis modeling
•Analysis modeling
focuses on three
attributes of
software:
–information to be
processed
–function to be
delivered
–behavior to be
exhibited.
Itgivesthe
situation to
discoverwhatthe
problemreallyis

Requirements analysis /
Analysis modeling
•Requirementsanalysisresultsinthespecificationof
software’soperationalcharacteristics,indicates
software’sinterfacewithothersystemelements,
andestablishesconstraintsthatsoftwaremust
meet.
•Requirementsanalysisallowsyou(regardlessof
whetheryou’recalledasoftwareengineer,an
analyst,oramodeler)toelaborateonbasic
requirementsestablishedduringtheinception,
elicitation,andnegotiationtasksthatarepartof
requirementsengineering.

Requirements analysis /
Analysis modeling
•Thesemodelsprovideasoftwaredesigner
withinformationthatcanbetranslatedto
architectural,interface,andcomponent-level
designs.
•Finally,therequirementsmodel(andthe
softwarerequirementsspecification)provides
thedeveloperandthecustomerwiththe
meanstoassessqualityoncesoftwareisbuilt.

Types of Requirements analysis /
Analysis modeling
(It is the first technical representation of systems)
•Scenario-basedmodelsofrequirementsfromthepointof
viewofvarioussystem“actors”
•Datamodelsthatdepicttheinformationdomainforthe
problem
•Class-basedmodelsthatrepresentobject-orientedclasses
(attributesandoperations)andthemannerinwhichclasses
collaboratetoachievesystemrequirements
•Flow-orientedmodelsthatrepresentthefunctionalelements
ofthesystemandhowtheytransformdataasitmoves
throughthesystem3
•Behavioralmodelsthatdepicthowthesoftwarebehavesasa
consequenceofexternal“events”.
–ThemostcommonmethodforcreatingthesediagramsisUML,
UnifiedModelingLanguage.

Elements/Types of Requirements analysis /
Analysis modeling

Scenario-based Modeling
•Forthebuildingofanalysisanddesignmodels,itis
essentialforsoftwareengineerstounderstandhowend
usersandotheractorswanttointeractwiththesystem.
•itidentifiesthepossibleusecasesforthesystemand
producestheusecasediagram,towhichalltheother
stagesofrequirementsmodelingrefer.
•AnalysisModelingwithUMLbeginswiththecreationof
scenariosintheform:
•Use-casesText
•Use-casesdiagrams
•ActivityDiagrams
•SwimlaneDiagrams

Usecase
•Theusecaseisessentiallyaprimaryexampleof
howtheproposedsoftwareapplicationor
systemismeanttobeused,fromtheuser's
pointofview.Ausecasediagramwilltypically
showsystem'actors'(humansorotherentities
externaltothesystem)andhowtheyinteract
withthesystem.Technically,eachactionsucha
systemactorcanperformwiththeapplication
orsystemisconsideredtobeaseparateuse
case.
•Usecasecanberepresentedin2waysas
usecasetextandusecasediagram.

Use-cases Text
•Thefirststepindefiningausecaseistodefinethename,
usingtheverb-nounnamingconvention.
Sample Use Case Brief
•Use Case Name: Place Order
•Actors:
–Shopper
–Fulfillment System
–Billing System
•UseCaseDescription:Aftertheuserhasselecteditemsto
purchaseandthenordertheitems.Theuserwillprovide
paymentandshippinginformation.Thesystemwillrespond
withconfirmationoftheorderandatrackingnumberthat
theusercanusetocheckonorderstatusinthefuture.The
systemwillalsoprovidetheuserwithanestimateddelivery
datefortheorder,whichwillincludeallselecteditems.The
usermayalreadyhaveanaccountwiththecompanywith
billingandshippinginformation.

Detail/Formal Use Case Example
•You can clarify the use case further by refining the use case into a formal use case.
Example Usecase
•Use Case Name: Place Order
•Actors:
•Registered Shopper (Has an existing account, possibly with billing and shipping
information)
•Non-registered Shopper (Does not have an existing account)
•Fulfillment System (processes orders for delivery to customers)
•Billing System (bills customers for orders that have been placed)
•Triggers:
•The user indicates that she wants to purchase items that she has selected.
•Preconditions:
•User has selected the items to be purchased.
•Post-conditions:
•The order will be placed in the system.
•The user will have a tracking ID for the order.
•The user will know the estimated delivery date for the order.

Detail/Formal Use Case Example
•Normal Flow:
•Theuserwillindicatethatshewantstoordertheitemsthathavealreadybeen
selected.
•Thesystemwillpresentthebillingandshippinginformationthattheuserpreviously
stored.
•Theuserwillconfirmthattheexistingbillingandshippinginformationshouldbeused
forthisorder.
•Thesystemwillpresenttheamountthattheorderwillcost,includingapplicabletaxes
andshippingcharges.
•Theuserwillconfirmthattheorderinformationisaccurate.
•ThesystemwillprovidetheuserwithatrackingIDfortheorder.
•Thesystemwillsubmittheordertothefulfillmentsystemforevaluation.
•Thefulfillmentsystemwillprovidethesystemwithanestimateddeliverydate.
•Thesystemwillpresenttheestimateddeliverydatetotheuser.
•Theuserwillindicatethattheordershouldbeplaced.
•Thesystemwillrequestthatthebillingsystemshouldchargetheuserfortheorder.
•Thebillingsystemwillconfirmthatthechargehasbeenplacedfortheorder.
•Thesystemwillsubmittheordertothefulfillmentsystemforprocessing.
•Thefulfillmentsystemwillconfirmthattheorderisbeingprocessed.
•Thesystemwillindicatetotheuserthattheuserhasbeenchargedfortheorder.
•Thesystemwillindicatetotheuserthattheorderhasbeenplaced.
•Theuserwillexitthesystem.

Use-cases diagrams
•IntheUnifiedModelingLanguage(UML),ausecase
diagramcansummarizethedetailsofyoursystem's
users(alsoknownasactors)andtheirinteractionswith
thesystem.
•Createaprofessionaldiagramforanyusecaseusing
UMLdiagramtool.
•Tobuildone,you'lluseasetofspecializedsymbolsand
connectors.
•Aneffectiveusecasediagramcanhelpprojectteamto
discussandrepresent(useofuse-caseModel):
–Representing the goals of system-user interactions
–Defining and organizing functional requirements in a system
–Specifying the context and requirements of a system
–Modeling the basic flow of events in a use case
–Thescopeofyoursystem

Use case diagram components
•Actors:Theusersthatinteractwithasystem.An
actorcanbeaperson,anorganization,oran
outsidesystemthatinteractswithyourapplication
orsystem.Theymustbeexternalobjectsthat
produceorconsumedata.
•System:Aspecificsequenceofactionsand
interactionsbetweenactorsandthesystem.A
systemmayalsobereferredtoasascenario.
•Goals:Theendresultofmostusecases.A
successfuldiagramshoulddescribetheactivities
andvariantsusedtoreachthegoal.

Example 1

Use case diagram symbols and notation
•Usecases:Horizontallyshapedovalsthatrepresentthe
differentusesthatausermighthave.
•Actors:Stickfiguresthatrepresentthepeopleactually
employingtheusecases.
•Associations:Alinebetweenactorsandusecases.In
complexdiagrams,itisimportanttoknowwhichactors
areassociatedwithwhichusecases.
•Systemboundaryboxes:Aboxthatsetsasystemscope
tousecases.Allusecasesoutsidetheboxwouldbe
consideredoutsidethescopeofthatsystem.For
example,PsychoKillerisoutsidethescopeofoccupations
inthechainsawexamplefoundbelow.
•Packages:AUMLshapethatallowsyoutoputdifferent
elementsintogroups.Justaswithcomponentdiagrams,
thesegroupingsarerepresentedasfilefolders.

Book publishing use case diagram example

Railway reservation use case diagram example

Activity Diagrams
•Activitydiagramisanotherimportantdiagramin
UMLtodescribethedynamicaspectsofthe
system.
•Activitydiagramisbasicallyaflowchartto
representtheflowfromoneactivitytoanother
activity.Theactivitycanbedescribedasan
operationofthesystem.
•Thecontrolflowisdrawnfromoneoperationto
another.Thisflowcanbesequential,branched,
orconcurrent.Activitydiagramsdealwithall
typeofflowcontrolbyusingdifferentelements
suchasfork,join,etc

Purpose of Activity Diagrams
Activitydiagramisanotherimportantbehaviouraldiagram
inUMLdiagramtodescribedynamicaspectsofthesystem.
Activitydiagramisessentiallyanadvancedversionofflowchart
thatmodellingtheflowfromoneactivitytoanotheractivity.
Activitydiagramcanbeusedfor
oModelingworkflowbyusingactivities.
oModelingbusinessrequirements.
oHighlevelunderstandingofthesystem'sfunctionalities.
oDescribethesequencefromoneactivitytoanother.

How to Draw an Activity Diagram?
•Beforedrawinganactivitydiagram,wemusthaveaclear
understandingabouttheelementsusedinactivity
diagram.
•Themainelementofanactivitydiagramistheactivity
itself.Anactivityisafunctionperformedbythesystem.
•Afteridentifyingtheactivities,weneedtounderstand
howtheyareassociatedwithconstraintsandconditions.
•ComponentsofActivityDiagram:
–Activities
–Association
–Conditions
–Constraints

Example -order management system
•Theactivitydiagramismadetounderstandtheflowof
activitiesandismainlyusedbythebusinessusers.
•Followingdiagramisdrawnwiththefourmainactivities−
–Sendorderbythecustomer
–Receiptoftheorder
–Confirmtheorder
–Dispatchtheorder
•Afterreceivingtheorderrequest,conditionchecksare
performedtocheckifitisnormalorspecialorder.After
thetypeoforderisidentified,dispatchactivityis
performedandthatismarkedastheterminationofthe
process.

Example -order management system

Activity diagram can be used for
•Activitydiagramcanbeusedfor−
–Modelingworkflowbyusingactivities.
–Modelingbusinessrequirements.
–Highlevelunderstandingofthesystem's
functionalities.
–Investigatingbusinessrequirementsata
laterstage.

Swimlane Diagram
•Aswimlanediagramisatypeofflowchartthatdelineateswho
doeswhatinaprocess.
•Activitydiagramstellyouwhathappens,buttheydonottellyou
whodoeswhat.
•Like a flowchart, it diagrams a process from start to finish, but it
also divides these steps into categories(lanes) to help distinguish
which departments or employees are responsible for each set of
actions.
•Itshowsconnections,communicationandhandoffsbetween
theselanes,anditcanservetohighlightwaste,redundancyand
inefficiencyinaprocess.

Why Swimlane Diagrams Are Useful
•Duringanyprocessimprovementinitiative,swimlaneshelpidentifynotjustthe
bottlenecksinaprocess,butalsowhichdepartmentisresponsibleforthem.
•Helpingtoclarifyresponsibilitiesandhelpdepartmentsworktogetherinaworld
wheredepartmentsoftendon'tunderstandwhattheotherdepartmentsdo.
•Youmayfindcostlyredundanciesandduplicationsorgapsandcommunication
problems.
How to Create a Swim Lane Flowchart
•Identifythelanes.Decidewhatdivisionsyouneedrepresentedbyswimlanes
andlabelthem.
•Startyourchart.Definethestartingpointoftheprocess.Addarounded
rectangletothetopoftheappropriateswimlanetoindicateitsstartingpoint
andlabelit.
•Addsteps.Nextaddmorestepstoyourchart.Eachstepshouldbeconnected
totheonebeforeitwithaline.Todrawstepsinthesameswimlane,draw
fromtoptobottom.Toaddastepinanotherdivisiongofromlefttoright.
Witheachstep,describewhatitrepresentsuntilyoureachtheendofthe
process.Thearrowsbetweenthestepsindicatethetransferofinformationor
flow.

Example -order management system

Swimlane Diagram

Example –ATM System