Art for Chapter 5, Analysis

advertisement
Figure 5-2, Products of requirements elicitation and
analysis.
Requirements
elicitation
Requirements
Specification
nonfunctional
requirements
functional
model
Analysis
Analysis Model
dynamic model
analysis object
model
System design
Object design
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
1
Figure 5-3, The analysis model is composed of the
functional model, the object model, and the dynamic
model.
use case
diagram:View
class
diagram:View
functional
model:Model
object
model:Model
statechart
diagram:View
sequence
diagram:View
dynamic
model:Model
analysis
model:Model
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
2
Figure 5-4, Examples and counterexamples of classes
in the analysis object model of SatWatch.
Domain concepts that should be represented
in the analysis object model.
UniversalTime
TimeZone
Location
Bernd Bruegge & Allen H. Dutoit
Software classes that should not be represented
in the analysis object model.
TimeZoneDatabase
Refers to how time zones
are stored (design
decision).
GPSLocator
Denotes to how location is
measured (design
decision).
UserId
Refers to an internal
mechanism for identifying
users (design decision)
Object-Oriented Software Engineering: Using UML, Patterns, and Java
3
Figure 5-5, Analysis classes for the 2Bwatch example.
<<entity>>
Year
<<entity>>
Month
<<control>>
ChangeDateControl
<<boundary>>
ButtonBoundary
<<boundary>>
LCDDisplayBoundary
<<entity>>
Day
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
4
Figure 5-6, An example of a generalization hierarchy.
Incident
LowPriority
Emergency
CatInTree
EarthQuake
TrafficAccident
Bernd Bruegge & Allen H. Dutoit
Disaster
ChemicalLeak
BuildingFire
Object-Oriented Software Engineering: Using UML, Patterns, and Java
5
Figure 5-8, Sequence diagram for the ReportEmergency
use case.
Manage
EmergencyControl
Report
EmergencyButton
FieldOfficer
press()
«create»
ReportEmergency
Control
«create»
ReportEmergency
Form
fillContents()
submit()
submitReport()
«create»
«destroy»
Bernd Bruegge & Allen H. Dutoit
Emergency
Report
submitReportToDispatcher()
Object-Oriented Software Engineering: Using UML, Patterns, and Java
6
Figure 5-9, Sequence diagram for the ReportEmergency
use case (continued from Figure 5-8).
Manage
EmergencyControl
submitReportToDispatcher() «create»
Dispatcher
IncidentForm
createIncident()
«create»
Incident
submit()
«create»
Acknowledgment
«destroy»
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
7
Figure 5-10, Sequence diagram for the
ReportEmergency use case (continued from Figure 5-9).
FieldOfficer
Manage
EmergencyControl
ReportEmergency
Control
acknowledgeReport()
«create»
Acknowledgment
Notice
dismiss()
endReportTransaction()
«destroy»
Bernd Bruegge & Allen H. Dutoit
«destroy»
Object-Oriented Software Engineering: Using UML, Patterns, and Java
8
Figure 5-12, Examples of CRC cards for the
ReportEmergencyControl and the Incident classes.
Rep ortEmergencyCon trol
In ciden t
Re spon sibilities
Co llects in put fro m Fieldo fficer
Co ntro ls sequen ce of
fo rms durin g emergency
repo rtin g
Bernd Bruegge & Allen H. Dutoit
C olla bo rato rs
Re spon sibilities
EmergencyRep ortForm
EmergencyRep ort
Track all in formation
Ackn owledgemen tNoticerelated to a single in cident.
Object-Oriented Software Engineering: Using UML, Patterns, and Java
C olla bo rato rs
Reso urce
9
Figure 5-13, An example of association between the
EmergencyReport and the FieldOfficer classes.
FieldOfficer
*
author
Bernd Bruegge & Allen H. Dutoit
writes
1
EmergencyReport
document
Object-Oriented Software Engineering: Using UML, Patterns, and Java
10
Figure 5-14, Eliminating redundant association.
FieldOfficer
author
*
document
writes
1
EmergencyReport
1
1
reports
1
Bernd Bruegge & Allen H. Dutoit
Incident
triggers
1
Object-Oriented Software Engineering: Using UML, Patterns, and Java
11
Figure 5-15, Examples of aggregations and
compositions.
FireStation
State
County
FireFighter
FireEngine
LeadCar
Ambulance
Township
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
12
Figure 5-16, Attributes of the EmergencyReport class.
EmergencyReport
emergencyType:{fire,traffic,other}
location:String
description:String
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
13
Figure 5-17, UML statechart for Incident.
Active
field officer
arrives on site
Reported
Assessment
dispatcher
allocates resources
field officer requests
additional resources
Response
Disengagement
field officer
releases resources
all resources
deallocated
when date > 1yr.
Inactive
Closed
Archived
all resources
submitted reports
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
14
Figure 5-18, An example of inheritance relationship.
PoliceOfficer
badgeNumber:Integer
FieldOfficer
Bernd Bruegge & Allen H. Dutoit
Dispatcher
Object-Oriented Software Engineering: Using UML, Patterns, and Java
15
Define
use cases
Define
participating
objects
Define
entity
objects
Define
boundary
objects
Define
control
objects
Figure 5-19,
Analysis
activities.
Define
interactions
Define
nontrivial
behavior
Define
attributes
Define
associations
Consolidate
model
Review
model
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
16
Client
Developer
Report problem
or
change request
Design change
and
estimate impact
Review proposed
change
[change approved]
Update
requirements
Design
test
Archive
request
Figure 522, An
example of
a revision
process.
Update
design
Update code
(if applicable)
Execute all
relevant tests
Review actual
change
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
17
Figure 5-26, UML sequence
diagram for AnnounceTournament,
tournament creation workflow.
:Tournament
Form
:Arena
:League
:LeagueOwner
newTournament(league)
«new»
:Announce
Tournament
Control
checkMaxTournament()
setName(name)
setMaxPlayers(maxp)
commit()
createTournament(name,maxp)
createTournament(name,maxp)
«new»
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
:Tournament
18
Figure 5-27, UML sequence diagram for
AnnounceTournament use case, sponsorship workflow.
:LeagueOwner
:Request
Sponsorship
Form
:Announce
Tournament :Tournament
Control
:Arena
:Advertiser
requestExclusiveSponsor()
requestExclusiveSponsor()
findInterestedExclusiveSponsors()
confirmSponsorInterest()
:Sponsorship
Request
notifySponsor()
:Sponsorship «new»
Reply
notifyLeagueOwner()
reply(yesNo)
selectSponsor()
setSponsorship(sponsor)
setSponsorship(sponsor)
setSponsorship(sponsor)
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
19
Figure 5-28, UML sequence diagram for
AnnounceTournament use case, interest group workflow
:LeagueOwner
:Notify
Interest
GroupsForm
:Announce
Tournament
Control
:Interest
Group
notifySponsorsOfDecision()
notifySponsorsOfDecision()
«new»
:Player :Advertiser
:Sponsor
Notice
notifyInterestGroups(groups)
notifyInterestGroups(groups)
notifyInterestGroups(groups)
«new»
Bernd Bruegge & Allen H. Dutoit
notifyAdvertiser(yesNo)
:Interest
Group
Notice
notifyPlayer()
Object-Oriented Software Engineering: Using UML, Patterns, and Java
20
Figure 5-29, Entity objects identified after analyzing
the AnnounceTournament use case.
Arena
1
max tournaments
sponsorship fee
1
1
1
*
Advertiser
1
1
1
*
LeagueOwner
1
*
League
1
*
Tournament
1
*
Match
Bernd Bruegge & Allen H. Dutoit
1
1
*
Advertisement
Account
balance
charges
payments
1
*
*
Game
*
*
1
*
*
*
TournamentStyle
*
Interest Group
1
*
User
*
*
*
*
name
contact
Player
Object-Oriented Software Engineering: Using UML, Patterns, and Java
21
Figure 5-30, Inheritance hierarchy among entity
objects of the AnnounceTournament use case.
User
LeagueOwner
Advertiser
Game
TicTacToe
Bernd Bruegge & Allen H. Dutoit
Player
TournamentStyle
Chess
KnockOutStyle
Object-Oriented Software Engineering: Using UML, Patterns, and Java
RoundRobinStyle
22
Figure 5-31, Associations among boundary, control, and
selected entity objects participating in the
AnnounceTournament use case.
AnnounceTournamentControl
Arena
TournamentForm
Tournament
RequestSponsorshipForm
SponsorshipRequest
SponsorshipReply
Advertiser
LeagueOwner
SelectExclusiveSponsorForm
SponsorNotice
NotifyInterestGroupsForm
InterestGroup
InterestGroupNotice
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
23
Figure 5-32, A naive model of the Gregorian calendar.
Year
1
*
Month
1
*
Week
1
*
Day
Bernd Bruegge & Allen H. Dutoit
Object-Oriented Software Engineering: Using UML, Patterns, and Java
24
Download