Professional Documents
Culture Documents
Chapter8 AnalysisModeling
copyright 1996, 2001, 2005
R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
RequirementsAnalysis
Requirementsanalysis
Requirementsanalysisallowsthesoftwareengineer (calledananalystormodelerinthisrole)to:
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
ABridge
system descriptio n
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
RulesofThumb
Themodelshouldfocusonrequirementsthatarevisiblewithinthe problemorbusinessdomain.Thelevelofabstractionshouldbe relativelyhigh. Eachelementoftheanalysismodelshouldaddtoanoverall understandingofsoftwarerequirementsandprovideinsightinto theinformationdomain,functionandbehaviorofthesystem. Delayconsiderationofinfrastructureandothernonfunctional modelsuntildesign. Minimizecouplingthroughoutthesystem. Becertainthattheanalysismodelprovidesvaluetoall stakeholders. Keepthemodelassimpleasitcanbe.
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
DomainAnalysis
Softwaredomainanalysisistheidentification,analysis, andspecificationofcommonrequirementsfroma specificapplicationdomain,typicallyforreuseon multipleprojectswithinthatapplicationdomain... [Objectorienteddomainanalysisis]theidentification, analysis,andspecificationofcommon,reusable capabilitieswithinaspecificapplicationdomain,in termsofcommonobjects,classes,subassemblies,and frameworks...
Donald Firesmith
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
DomainAnalysis
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
DataModeling
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
WhatisaDataObject?
Object somethingthatisdescribedbyaset ofattributes(dataitems)andthatwillbe manipulatedwithinthesoftware(system) each instance ofanobject(e.g.,abook) canbeidentifieduniquely(e.g.,ISBN#) eachplaysanecessaryroleinthesystem i.e.,thesystemcouldnotfunctionwithout accesstoinstancesoftheobject eachisdescribedbyattributesthatare themselvesdataitems
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
TypicalObjects
externalentities(printer,user,sensor) things (e.g,reports,displays,signals) occurrencesorevents(e.g.,interrupt,alarm) roles (e.g.,manager,engineer,salesperson) (e.g.,division,team) organizationalunits places (e.g.,manufacturingfloor) structures(e.g.,employeerecord)
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
DataObjectsandAttributes
Adataobjectcontainsasetofattributesthat actasanaspect,quality,characteristic,or descriptoroftheobject object: automobile attributes: make model body type price options code
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
10
WhatisaRelationship?
relationship indicatesconnectedness; a"fact"thatmustbe"remembered" bythesystemandcannotorisnotcomputed orderivedmechanically
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
11
ERDNotation
One common form: object 1
(0, m)
relationship
(1, 1)
object 2
attribute
object 2
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
12
BuildinganERD
Level1modelalldataobjects(entities)andtheir connectionstooneanother Level2modelallentitiesandrelationships Level3modelallentities,relationships,andthe attributesthatprovidefurtherdepth
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
13
TheERD:AnExample
Customer standard task table (1,1)
selected from
(1,1)
places
(1,m)
(1,n)
(1,w) (1,i)
(1,1)
consists of lists
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
14
ObjectOrientedConcepts
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
15
Classes
objectorientedthinkingbeginswiththe definitionofaclass,oftendefinedas:
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
16
BuildingaClass
class name attributes: operations
attributes: operations:
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
17
WhatisaClass?
occurrences things external entities roles organizational units places structures
operations:
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
18
Encapsulation/Hiding
The object encapsulates both data and the logical procedures required to method manipulate the data
#1
data
method #2 method #3
method #6
method #5
method #4
19
ClassHierarchy
PieceOfFurniture (superclass)
Table
Chair
Desk
Chable"
subclasses of the
instances of Chair
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
20
Methods (a.k.a.Operations,Services)
An executable procedure that is encapsulated in a class and is designed to operate on one or more data attributes that are defined as part of the class. A method is invoked via message passing.
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
21
ScenarioBasedModeling
[Usecases]aresimplyanaidtodefiningwhatexists outsidethesystem(actors)andwhatshouldbe performedbythesystem(usecases).IvarJacobson
(1)Whatshouldwewriteabout? (2)Howmuchshouldwewriteaboutit? (3)Howdetailedshouldwemakeourdescription? (4)Howshouldweorganizethedescription?
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
22
UseCases
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
23
DevelopingaUseCase
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
24
UseCaseDiagram
SafeHome Access camera surveillance via the Internet cameras
Set alarm
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
25
ActivityDiagram
enter pas word s and user ID
Supplementstheusecasebyprovidingadiagrammatic representationofproceduralflow
valid p sswor d ID a s/ in valid p asswor d ID s/
select s urveillance
t h mb ail views u n
see an h ot er camer a
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
26
h o m e o wn e r
SwimlaneDiagrams
c a m e ra
i n t e rf a c e
s elect s urveillance
n o in p u t t r ies r ema in
in p u t t r ie s r emain
t h u mb n ail vie ws
generate video output view camera output in labelled window prompt for another view
exit t h is f u n ct io n see an o t h e r camer a
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
27
FlowOrientedModeling
Representshowdataobjectsaretransformedatthey movethroughthesystem Adataflowdiagram(DFD)isthediagrammaticform thatisused Consideredbymanytobeanoldschoolapproach,flow orientedmodelingcontinuestoprovideaviewofthe systemthatisuniqueitshouldbeusedtosupplement otheranalysismodelelements
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
28
TheFlowModel
Everycomputerbasedsystemisan informationtransform....
input
output
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
29
FlowModelingNotation
external entity
30
ExternalEntity
A producer or consumer of data Examples:aperson,adevice,asensor Anotherexample:computerbased system Datamustalwaysoriginatesomewhere andmustalwaysbesenttosomething
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
31
Process
A data transformer (changes input to output) Examples:computetaxes,determinearea, formatreport,displaygraph Datamustalwaysbeprocessedinsome waytoachievesystemfunction
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
32
DataFlow
Data flows through a system, beginning as input and be transformed into output.
base compute triangle area area
height
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
33
DataStores
Data is often stored for later use.
sensor # sensor #, type, location, age
report required
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
34
DataFlowDiagramming: Guidelines
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
ConstructingaDFDI
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
36
Level0DFDExample
user
processing request requested video signal
video source
monitor
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
37
ConstructingaDFDII
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
38
TheDataFlowHierarchy
x a P b y level 0
p1
c d
p2
f
p4
p3
level 1
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
39
FlowModelingNotes
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
40
ProcessSpecification(PSPEC)
bubble
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
41
DFDs:ALookAhead
analysis model
Maps into
design model
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
42
ControlFlowDiagrams
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
TheControlModel
thecontrolflowdiagramis"superimposed"ontheDFD andshowseventsthatcontroltheprocessesnotedin theDFD controlflowseventsandcontrolitemsarenotedby dashedarrows averticalbarimpliesaninputtooroutputfromacontrol spec(CSPEC)aseparatespecificationthat describeshowcontrolishandled adashedarrowenteringaverticalbarisaninputtothe CSPEC adashedarrowleavingaprocessimpliesadata condition adashedarrowenteringaprocessimpliesacontrol inputreaddirectlybytheprocess controlflowsdonotphysicallyactivate/deactivatethe processesthisisdoneviatheCSPEC
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
44
ControlFlowDiagram
c p sd n o ie o e b e e o /o e p r n ff
re d a o e to p ra r in u pt
fu ll p bm ro le lig t h
s rt ta
mn g aae c p in oy g
e p m ty
re a lo d p cs ro e s p rfo e rm p bm ro le d g o is ia n s
c a re te ue sr dpy is la s
d p yp n l e a le is la a e n b d ja m d me
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
45
ControlSpecification(CSPEC)
TheCSPECcanbe: statediagram (sequentialspec) statetransitiontable decisiontables activationtables combinatorialspec
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
46
GuidelinesforBuildingaCSPEC
listallsensorsthatare"read"bythesoftware listallinterruptconditions listall"switches"thatareactuatedbytheoperator listalldataconditions recallingthenounverbparsethatwasappliedtothe softwarestatementofscope,reviewall"controlitems" aspossibleCSPECinputs/outputs describethebehaviorofasystembyidentifyingits states;identifyhoweachstateisreachanddefines thetransitionsbetweenstates focusonpossibleomissions...averycommonerrorin specifyingcontrol,e.g.,ask:"IsthereanyotherwayI cangettothisstateorexitfromit?"
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
47
ClassBasedModeling
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
48
Externalentities(e.g.,othersystems,devices,people)thatproduceorconsume informationtobeusedbyacomputerbasedsystem. Things(e.g,reports,displays,letters,signals)thatarepartoftheinformation domainfortheproblem. Occurrencesorevents(e.g.,apropertytransferorthecompletionofaseriesofrobot movements)thatoccurwithinthecontextofsystemoperation. Roles(e.g.,manager,engineer,salesperson)playedbypeoplewhointeractwiththe system. Organizationalunits(e.g.,division,group,team)thatarerelevanttoanapplication. Places(e.g.,manufacturingfloororloadingdock)thatestablishthecontextofthe problemandtheoverallfunctionofthesystem. Structures(e.g.,sensors,fourwheeledvehicles,orcomputers)thatdefineaclassof objectsorrelatedclassesofobjects.
AnalysisClasses
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
49
SelectingClassesCriteria
retainedinformation neededservices multipleattributes commonattributes commonoperations essentialrequirements
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
50
Class name
ClassDiagram
System
systemID verificationPhoneNumber systemStatus delayTime telephoneNumber masterPassword temporaryPassword numberTries
attributes
operations
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
51
ClassDiagram
FloorPlan
type nam e ou tsid eDim ension s determineTyp ( ) e position Floorplan scale( ) ch ang color( ) e
Camera
type ID location fieldV iew panA ngle ZoomSetting determineType () trans lateLocation () dis playID() dis playV iew() dis playZoom()
Wall
type wallDimens ions
()
is used to build
WallSegment
type s tartCoordinates s topCoordinates nextWallSement
Window
type s tartCoordinates s topCoordinates nextWindow
Door
type s tartCoordinates s topCoordinates nextDoor
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
determineTyp ( ) e draw ) (
52
CRCModeling
Analysisclasseshaveresponsibilities
Analysisclassescollaboratewithoneanother
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
53
CRCModeling
Class: Class: Description: Class: Description:FloorPlan Class: Description: Respo nsibility: Description: Respo nsibility: Respo nsibility: Respo nsibility:
defines floor plan name/type manages floor plan positioning scales floor plan for display scales floor plan for display incorporates walls, doors and windows Wall shows position of video cameras Camera
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
54
ClassTypes
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
55
Responsibilities
Systemintelligenceshouldbedistributedacrossclasses tobestaddresstheneedsoftheproblem Eachresponsibilityshouldbestatedasgenerallyas possible Informationandthebehaviorrelatedtoitshouldreside withinthesameclass Informationaboutonethingshouldbelocalizedwitha singleclass,notdistributedacrossmultipleclasses. Responsibilitiesshouldbesharedamongrelatedclasses, whenappropriate.
56
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
Collaborations
Classesfulfilltheirresponsibilitiesinoneoftwoways:
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
57
CompositeAggregateClass
Player
PlayerHead
PlayerBody
PlayerArms
PlayerLegs
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
58
ReviewingtheCRCModel
Allparticipantsinthereview(oftheCRCmodel)aregivenasubsetoftheCRCmodel indexcards.
Cardsthatcollaborateshouldbeseparated(i.e.,noreviewershouldhavetwocardsthat collaborate).
Whenthetokenispassed,theholderoftheclasscardisaskedtodescribethe responsibilitiesnotedonthecard.
Asthereviewleadercomestoanamedobject,shepassesatokentothepersonholdingthe correspondingclassindexcard.
Iftheresponsibilitiesandcollaborationsnotedontheindexcardscannot accommodatetheusecase,modificationsaremadetothecards.
Thegroupdetermineswhetherone(ormore)oftheresponsibilitiessatisfiestheusecase requirement.
Thismayincludethedefinitionofnewclasses(andcorrespondingCRCindexcards)orthe specificationofneworrevisedresponsibilitiesorcollaborationsonexistingcards.
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
59
AssociationsandDependencies
Twoanalysisclassesareoftenrelatedtooneanotherin somefashion
Inmanyinstances,aclientserverrelationshipexists betweentwoanalysisclasses.
Insuchcases,aclientclassdependsontheserverclassinsome wayandadependencyrelationshipisestablished
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
60
Multiplicity
Wall
1 is used to build
0..*
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
61
Dependencies
DisplayWindow <<access>>
{password}
Camera
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
62
AnalysisPackages
Variouselementsoftheanalysismodel(e.g.,usecases, analysisclasses)arecategorizedinamannerthat packagesthemasagrouping Theplussignprecedingtheanalysisclassnameineach packageindicatesthattheclasseshavepublicvisibility andarethereforeaccessiblefromotherpackages. Othersymbolscanprecedeanelementwithinapackage. Aminussignindicatesthatanelementishiddenfrom allotherpackagesanda#symbolindicatesthatan elementisaccessibleonlytopackagescontainedwithina givenpackage.
63
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
AnalysisPackages
package name
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
64
BehavioralModeling
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
65
StateRepresentations
Inthecontextofbehavioralmodeling,twodifferent characterizationsofstatesmustbeconsidered:
Thestateofaclasstakesonbothpassiveandactive characteristics[CHA93].
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
66
StateDiagramfortheControlPanelClass
t imer < lockedTime locked
password = incorrect & numberOfTries < maxTries comparing password ent ered numberOfTries > maxTries
key hit
reading
do: validatePassword
password = correct
select ing
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
67
TheStatesofaSystem
stateasetofobservablecircumstances thatcharacterizesthebehaviorofa systematagiventime statetransitionthemovementfromone statetoanother eventanoccurrencethatcausesthe systemtoexhibitsomepredictableform ofbehavior actionprocessthatoccursasa consequenceofmakingatransition
68
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
BehavioralModeling
drawastatediagramorasequencediagram
indicateevent indicateaction
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
69
SequenceDiagram
homeowner cont rol panel syst em sensors sensors syst em ready
A
password ent ered
reading
comparing
select ing act ivat ion successful act ivat ion successful
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
70
WritingtheSoftwareSpecification
Everyone knew exactly what had to be done until someone wrote it down!
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
71
SpecificationGuidelines
use a layered format that provides increasing detail as the "layers" deepen use consistent graphical notation and apply textual terms consistently (stay away from aliases) be sure to define all acronyms be sure to include a table of contents; ideally, include an index and/or a glossary write in a simple, unambiguous style (see "editing suggestions" on the following pages) always put yourself in the reader's position, "Would I be able to understand this if I wasn't intimately familiar with the system?"
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
72
SpecificationGuidelines
Be on the lookout for persuasive connectors, ask why? keys: certainly, therefore, clearly, obviously, it follows that ... Watch out for vague terms keys: some, sometimes, often, usually,ordinarily, most, mostly ... When lists are given, but not completed, be sure all items are understood keys: etc., and so forth, and so on, such as Be sure stated ranges don't contain unstated assumptions e.g., Valid codes range from 10 to 100. Integer? Real? Hex? Beware of vague verbs such as handled, rejected, processed, ... Beware "passive voice" statements e.g., The parameters are initialized.By what? Beware "dangling" pronouns e.g., The I/O module communicated with the data validation module and its contol flag is set. Whose control flag?
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
73
SpecificationGuidelines
When a term is explicitly defined in one place, try substituting the definition forother occurrences of the term When a structure is described in words, draw a picture When a structure is described with a picture, try to redraw the picture to emphasize different elements of the structure When symbolic equations are used, try expressing their meaning in words When a calculation is specified, work at least two examples Look for statements that imply certainty, then ask for proof keys; always, every, all, none, never Search behind certainty statementsbe sure restrictions or limitations are realistic
ThesecoursewarematerialsaretobeusedinconjunctionwithSoftwareEngineering:APractitionersApproach,6/eand areprovidedwithpermissionbyR.S.Pressman&Associates,Inc.,copyright1996,2001,2005
74