Beruflich Dokumente
Kultur Dokumente
R1
R2
R3
R4
R5
Requirements to component
interaction mapping:
I-1 I-2 I-3 I-4 I-5
R1
R2
R3
R4
R5
What is it?
22
22
Unified Modeling Language (UML):
The
The Value
Value of
of the
the UML
UML
Is
Is an
an open
open standard
standard
Supports
Supports the
the entire
entire software
software development
development
lifecycle
lifecycle
Supports
Supports diverse
diverse applications
applications areas
areas
Is
Is based
based on
on experience
experience and
and needs
needs of
of the
the
user
user community
community
Supported
Supported by
by many
many tools
tools
29
29
History of UML:
Creating
Creating the
the UML
UML
UML 1.5
UML
UML1.3
1.3
OMG Acceptance, Nov 1997
OMG Acceptance, Nov 1997
Final submission to OMG, Sep ‘97
Final submission to OMG, Sep ‘97 UML
UML1.1
1.1
public First submission to OMG, Jan ´97
public First submission to OMG, Jan ´97
feedback
feedback
UML partners
UML partners
UML
UML1.0
1.0
Other
Othermethods
methods Booch
Boochmethod
method OMT
OMT OOSE
OOSE
30
30
Contributors:
Contributions
Contributions to
to the
the UML
UML
Harel
Harel
Meyer Gamma,
Meyer Gamma,etetalal
Statecharts
Statecharts
Before
Beforeand
andafter Frameworks
after Frameworksand
andpatterns,
patterns,
conditions
conditions
HP
HPFusion
Fusion
Booch
Booch Operation
Operationdescriptions
descriptionsand
and
Booch
Boochmethod
method message numbering
message numbering
Embley
Embley
Rumbaugh
Rumbaugh
Singleton
Singletonclasses
classesand
and
OMT
OMT high-level view
high-level view
Jacobson
Jacobson Wirfs-Brock
Wirfs-Brock
OOSE
OOSE Responsibilities
Responsibilities
Shlaer Odell
Shlaer- -Mellor
Mellor Odell
Object Classification
Objectlifecycles
lifecycles Classification
32
32
Modeling
Modeling Elements
Elements
Structural
Structural elements
elements
class,
class,interface,
interface,collaboration,
collaboration,use
usecase,
case,
active
activeclass,
class,component,
component,node
node
Behavioral
Behavioral elements
elements
interaction,
interaction,state
statemachine
machine
Grouping
Grouping elements
elements
package,
package,subsystem
subsystem
Other
Other elements
elements
note
note
Models,
Models, Views,
Views, and
and Diagrams
Diagrams
AAmodel
modelisisaacomplete
complete
description
descriptionofofaasystem
system
from
fromaaparticular
particular State
State
perspective
perspective State
State
Diagrams
Class
Diagrams
Class
Diagrams
Use
Use Case
Case Diagrams
Diagrams
Use
UseCase
DiagramsCase Diagrams State
State
Use Case Use
UseCase
Diagrams
DiagramsCase State
State
Diagrams
Use
Use Case
Case Diagrams
Diagrams Object
Diagrams
Object
Use Case
Diagrams
Sequence Diagrams Diagrams
Diagrams
Diagrams
Sequence
Diagrams Diagrams
Diagrams
Diagrams
Diagrams
Diagrams
Scenario
Scenario State
State
Scenario
Scenario
Diagrams State
State
Diagrams
Collaboration
Diagrams
Collaboration
Diagrams Models Component
Diagrams
Component
Diagrams
Diagrams
Diagrams Models Diagrams
Diagrams
Diagrams Diagrams
Scenario
Scenario
Component
Component
Scenario
Scenario
Diagrams
Component
Diagrams
Component
Deployment
Diagrams
Statechart
Diagrams
Statechart
Diagrams Deployment
Diagrams
Diagrams
Diagrams
Diagrams Diagrams
Diagrams
Diagrams Activity
Activity
Diagrams
Diagrams
38
38
Diagrams
Diagrams
AA diagram
diagram isis aa view
view into
into aa model
model
Presented
Presentedfrom
fromthethe aspect
aspectofof aaparticular
particular
stakeholder
stakeholder
Provides
Providesaapartial
partialrepresentation
representationof ofthe
the system
system
Is
Issemantically
semanticallyconsistent
consistentwith
withother
otherviews
views
In
In the
the UML,
UML, there
there are
are nine
nine standard
standard
diagrams
diagrams
Static
Staticviews:
views:use
usecase,
case,class,
class,object,
object,
component,
component,deployment
deployment
Dynamic
Dynamicviews:
views:sequence,
sequence,collaboration,
collaboration,
statechart,
statechart,activity
activity
39
39
Use-case diagrams:
They offer a systematic and intuitive means
of capturing functional requirements.
The use-case model helps the customer,
users and developers agree on how to use
system.
An user is represented as actor.
Actors use the system as they interact with
use cases.
All the actors and use cases of a system
make up a use-case model.
Use
Use Case
Case Diagram
Diagram
Captures
Captures system
system functionality
functionality as
as seen
seen by
by
users
users
40
40
Use case for Elevator Problem:
Elevator
Press an elevator
button
User
Actor
Use
Use Case
Case Diagram
Diagram
Captures
Captures system
system functionality
functionality as
as seen
seen by
by
users
users
Built
Built in
in early
early stages
stages of
of development
development
Purpose
Purpose
Specify
Specifythe
thecontext
contextof
ofaasystem
system
Capture
Capturethetherequirements
requirementsofofaa system
system
Validate
Validateaasystem’s
system’sarchitecture
architecture
Drive
Driveimplementation
implementationandandgenerate
generatetest
testcases
cases
Developed
Developed by
by analysts
analysts and
and domain
domain experts
experts
41
41
Activity
Activity Diagram
Diagram
Captures
Captures dynamic
dynamic behavior
behavior (activity-oriented)
(activity-oriented)
56
56
Activity
Activity Diagram
Diagram
Captures
Captures dynamic
dynamic behavior
behavior (activity-oriented)
(activity-oriented)
Purpose
Purpose
Model
Modelbusiness
businessworkflows
workflows
Model
Modeloperations
operations
57
57
Further to Activity diagrams:
[condition 1]
A c tiv ity A c tiv ity
• Dynamic aspects of a
system [condition 2]
• Describe
• parallel processing
• workflows A c tiv ity A c tiv ity
• Show flow from activity to
activity
• Activity [synchronization
condition]
conceptual: task to be done
P u t c o ffe e A d d w a te r
in filte r to r e s e r v o ir
P u t filte r
in m a c h in e
Turn on
m a c h in e
Object Oriented Analysis Phase
Concise Problem Definition: Define each
requirement as interaction between nouns
and verbs.
Extracts nouns, verbs and interactions
between them.
Through use case, show interactions between
people and machines.
Elevator Problem Definition:
A product is to be installed to control n elevators in a
building with m floors. The problem concerns the logic
required to move elevators between floors according to the
following constraints:
Each elevator has a set of m buttons, one for each floor.
These illuminate when pressed and cause the elevator to visit
the corresponding floor. The illumination is cancelled when
corresponding floor is visited by the elevator.
Each floor, except the first floor and top floor, as two buttons,
one to request an up-elevator and one to request a down-
elevator. These buttons illuminate when passed. The
illumination is cancelled when an when an elevator visits the
floor and then moves in the desired direction.
When an elevator has no requests, it remains at its current
floor with the doors closed.
Use case for Elevator Problem:
Elevator
Elevator stopped, no
Button pushed, Elevator is moving in requests pending
button unlit Elevator
direction d, floor f is next
stopped, Go into wait states
requests
Determine if stop requested Close elevator doors
Process request pending
Check requests after time out
Turn on button
3. Turn button on
4. Move up one floor
5. Turn button off
6. Open doors
8. Press elevator button
9. Inform elevator 7. Start
controller timer
10. Turn
button on
11. Close doors
12. Move up
13. Turn one floor
button off 14. Open doors
15. Start
timer
16. Close doors
17. Move up one floor
Classes from sequence diagram:
CLASS
Elevator Controller
RESPONSIBILITY
1. Turn on elevator button
2. Turn off elevator button
3. Turn on elevator button
4. Turn off floor button
5. Move elevator up one floor
6. Move elevator down one floor
7. Open elevators door and start timer
8. Close elevator doors after time out
9. Check requests
10. Update requests
COLLABORATION
1. Class Elevator Button
2. Class Floor Button
3. Class Elevator
4. Class Elevator Doors
Classes from sequence diagram…:
CLASS
Elevator Controller
RESPONSIBILITY
1. Send message to Elevator Button to turn on button
2. Send message to Elevator Button to Turn off button
3. Send message to Floor Button to Turn on button
4. Send message to Floor Button to Turn off floor button
Public methods?
5. Send Message to Elevator to move up one floor
6. Send message to Elevator to move down one floor Private methods?
7. Send message to Elevator Doors to open
Private attributes?
8. Start timer
9. Send message to Elevator Doors to close after time
out
10. Check requests
11. Update requestsCOLLABORATION
Button
Illuminated: Boolean
Communicates Communicates
with with
Elevator
Doors open: Boolean
Collaboration Diagram:
Elevator doors