Sie sind auf Seite 1von 56

!

" #

!
%&

'

" #

"(
#
) )#

*
#
& #
, &

+#

#
"

. +) #
#' " # +

" #
"

#
#+

"#

+#
+#

#
+

# #

#
#
"

/
+
#
# "

#
+#

+#

# '
2
#

1 #
2

'0
"

#
#

3)
#
-

#5

61

Token

Place

#
7

/#

Transition

#
1

89
4

#5

61

/#
7

/#

#
#
7

/#

#
:

"

#
!#
.
&

2
)#
#

#
2

2 '0

# ;
< &

"

Legend:
A delegates task

to B

Use Case
Diagrams
Visualization of high-level
reaction to events

Activity Diagrams
Workflow presentation

State Diagrams

Refinement of
timing and sequence

Interaction
Diagrams
=

"

#
#
#

#
?

"
# #
) #

# #

#
#

+
2')

'

"
#

Example: Building a house

State

Choose site
Transition
Survey house
>

#
#
&

#'

Start state

#
#

#
1 )
&
+#" )
"
#

Action or Activity

Chose site
Transition
Survey House

Final state

"

#
) )#2
" )
'
)'

"
B
+#

#
&
'

#
#
)+
"

#'
+
#

#'
)
+ ##
#
)
+

)#
#'

"
'

&

Activity state

Action state

Switch light on
index := lookup(e)

Work up bill

Construct House
A

"
?

"
'

#+

'
#

1 )
1 +

"
Point in time

Drive Car
entry / radio on
do / steer car
exit / radio off

Construct House
entry / call architect
exit / pay architect

Action

!#
++ #2

'

"#
"

&

'

Check material
[incomplete]

Branch

Order material

Keyword

[complete]
Condition
Build house

Find drinks

[else]

[found water]

#
#

'#

"

#
Check material
[incomplete]
Order material
[complete]
Merge

Build house
-

)#
#
'

1 )
#

"
)#
#
# ;

Plan house
construction

Conditional
Concurrency

Fork
[Non-standard house]

A
Find site

Clear Finance

Assign Architect

C0
Join

DE

Build house
4

)#
#

"
1 )
& #
) '#
"
+

)#
#

) +

)#
#
#)

Order processing
Repeatedly executed
activity
Proof availability of
the ordered goods *

# ;
.

)#
#
# ;
+

&
)

.
"

)#
#
'

) ##+#
"
)
? #
#

"

# ;

) '#
'

Order goods

Receive goods
*

Synchronization with unlimited capacity

'

Supply goods

&
)

#
) )#
# ' 1 )
)
)#
#
#

Management
[ priority = 1]

Evaluate
Impact

"
'0
#
"

&
2

Revise
Plan

Support
Register
Bug

Engineering

Release
Fix

Fix
Bug

Test
Fix

Swimlane
=

'0

< &

'

&
#)

#
"
Ordering

'0
'

&

#
#

"

#
b : Order
[new]

Object
Object flow

Process order

b : Order
[processed]

Object state

>

'0

'0

&

# < &
'

&

&

Ordering
Object
b : Order
[new]

Control flow

Object flow
Process order

b : Order
[processed]
@

#
# 6"
6"
)#
#

&
2

#
#
"
#"

' #
'

)+
3) )

#
1+#

#
#

Process order
Goods not in stock / defer
deferred event
Proof availability
Goods not in stock / re-order goods

$A

7
)#
'0

'
3)
&

"
Wake Up

Turn on Coffee Pot

Send signal
Get Cups

Coffee
Pot

Coffee Done

Receive signal
Drink Coffee

5
' &

+
'0

#
' &

? " )
)
#

;
'0

#
G

#
#+ #

#
) )#

))

&

$$

Use Case Diagrams

*
Legend:
A delegates task

to B

Description of use case behavior

Interaction Diagrams
Definition of
classes, objects,
associations,
messages

Class Diagrams

Refinement of single
object behavior
Workflow
presentation

State Diagrams

Activity Diagrams
$-

*
#

#'
&

'
'0

#
'0

" #
#
#

'0

#
#
+#

#
#

+#

<#

3)

'0

'0

#+

&
#

#)
#

'0

$4

+)

name of the message

a:A

parameter

rotate(30.0, origin)

b:Point

message
sender object

receiver object
object reference

$:

#
#

#
' &

#
)

"

)#

'0

'0
) '
'0
# # )#

"
# '0

'

2&

'0
&

')

'

)
)

"

3)

) ?

actor
:TicketDB

object
create()

creation

o:Order

life line

object
(anonymous)

reserve(date,count)
debit(cost,o)
message

activation

:Account

bonus()

result

destruction

recursive
activation
$=

3)

o1:C1

o4:C4

o2:C2

create(x)
forking

concurrent
activation

o3:C3

call(x)

doit(z)
doit(y)

$>

3)

:Caller
a
{b-a < 1 sec}

constraint
c

:Agency
lift receiver
dial tone
type(4)
...

named
point in time

message with
duration (slanted)

activation

) ?

#
:Callee

active object
(frame bold)

Message
(without duration)

type(2)
bell tone

bell signal
lift receiver

end bell tone

end bell signal


$@

'#

61

local
variable
2:cost=reserve(order)

request(order)
:OrderAgent
1:checkCredit(customer)
sequence number

3)
H
+
H

3:debit(customer, cost)

:CreditAgency

) '#
0
)
,

tickets

:TicketDB

role name

message

#
) '#
) '#
" '

"
&

#
-A

'

+
$

12

+
3)

+D

&
3)

8
1J49$

) '#

"# #
3)

- I )+
- $I8D

&
) '#

4 &
) '#

1
+

#
>9 #& "89

#
6
#
6"
.

)#
#

!#
%

-$

? # .

'0

" )#

, +

?))

#
' ## &

'

+#
#

&
K

, &

1+

'0

'
1

3)

'

)'
+#

)
+#

')

2
#
--

6
+

#+

'

'0

#
#

&

6"
#

# #

# '

/) #
+#"
)#

' '

-4

#
#+
+
+
#

'

passive

active

state
name

state transition

-:

<

&

'

1 )

)#
+

'

"

start state

#
#

'0
+#

final state
active

create(init)

destroy / send master.destroyed(self)


-

#
#

&

#
'
#

E?
?

&

)
2?&
#"

#
?
< # 1#
?#+
?
L)

,
#
2')

2?

)
1 )

) "
+
'

)# # 1 )
#+
#)

# # #
# +
, +
" )'
2? "
#
& #"
,
,2?
, )#
# ?
#

#
?

,
+

)'

/
"
&

L
#

#
#

+
+#

" )#
-=

61

+
safe closed

guard

Wait

event

Open

key turned
[candle in] /
open safe

candle removed
[door closed] /
reveal lock

action

Lock
key turned
[candle out] /
release killer rabbit
->

6"
)#

)
#

#
1+#

" )

++ #

#
#
)
1+#

+#
change event
when NumberOfUsers = 0
active

backup
after 10 minutes
time event
-@

'
#

# '0

)#

alternative
representation
active

active

after 10 min. / send central.amAlive(self)

after 10 min
send
amAlive(self)

send signal

receiving object

central
4A

+
composite state

outgoing transition from


every sub state
wait

card
inserted
abort

sub state

active

start state

inspection
[ok]

transition from
one sub state
key in the
machine

done

card
inserted

transfer(x)

choice

transaction

entry / read card


exit / eject card

transition in sub state


4

)#
#

)'

"#

3)

#' '
)#
#

)'
' +# #
installation

finish

fork

error

join

final test
hardware test
test ports
concurrent sub state

test devices

software test
test modules

test application

4$

)#
#

)'

fork

"

join
final test
hardware test
test ports

installation

test devices
operating

software test
test modules

test application

4-

)#
#
) )#
+#
#
) )#

<# #
1+
61

#'
+
)

+
& #
, +
)

& #

# 2+ ,

)
#

#& #

#
#

& #

& #
+
44

61

< 1'

7#

Presentation

Application

)#

Database

distributed
presentation
remote database
access
three-layer
client/server
multi-layer
cooperative
client/server
4:

)#
,

"

2?

,
+

+
5

#
M.

##
)'
#

#
) )# + ,
G
#
#
) )#
G
G +

&

)#
+ ,

+
#
4

#
&
' &
package

#
#

dependency

Package A
Package C

Package B

Client

Supplier

#
#

"N
4=

"

#
+ ,

#+#
#

subpackage

subsystem

Marketing

Order
System

Customer

subsystem

Order System

Order

Position

class
stereotype
subsystem

classes

Marketing

visibility

+ Order
+ Customer
- Position
4>

)'
#'

%&
#

?'# ,
(

&

Functional Decomposition

OO Packages

Map the total system on


functions and subfunctions,
starting with the use case.

Collect classes into subsystems.


Build layers of subsystems.
Abstraction: Concentrate on essentials.
Locality: Group together related
components (data and algorithm).
Hiding: Restrict the visibility of details,
so that only those parts of a system that
need to know the details have access to
them.

4@

? #
++ #
#

)#

) +
+#

' )
#

&

)& #
#
&

)#
')

#
#

2
#

class or component
fulfilling the interface

uses-relation
Openable

Client

interface
:A

#
&

#
)

)#

&
#

+
#
)

1
'0
)
+

server :Host
database
meetingDB

++ #
#
:Scheduler

object

Reservation

node
direct channel

interface usage

client :PC
:Planer

component
:

+
+
#

' +#
&

#
" &
+
#)

#+#
#
"
2
? 72

2#+
+
+
2
+

+
' '0
+
# #
2
61

+
?

"
'0 &
) +
2+#

+
#

"#

&

2. 7!

,#
+
' ) #
#2
)
:$

$
component

Dictionary

Spelling Checker
Synonym Table

interfaces
myLexicon: Dictionary
o :Options

u :User Lexicon

object in
component
:-

5
+
#+#

+#

)#

+)
'0

'

#
)
+

+) #2 )

'

2#

migrated object

"

# "

workstation

mainServer
c:CustomerDB

become

hw :Customer

hw :Customer

node

component on node

object on node

:4

)
.

+
#
)
#

'

+)

" #
'#

'#
#

+
'# &

# #+
#
# )
#

# #

' &
')

##
'

#)+
+

') ) )

;
,

'

)#

' ') # )# "


+
1

'
#

"

::

#
#5
? # )
+ &&&
AAO # ) +
61 +
+ &&&

) ,

#5

# )

) ,

#5

# )

+ $A

Das könnte Ihnen auch gefallen