?"dsD
!9
?"dsD
!9
W:^y<vD
W:^y<vD
5 ?Dy
5 ?Dy
°
°
UML&UDP
z s"dá
?2s"dá
?2
z ?# ?¥1" ?# ?¥1" ----"d=? ?"d=? ?
z
MY ?#
??
z
MY ?-W¥W?
z
MY ?-W¥1 ó
?
4
?
?
?
Class
m
m
z ?m¥2 ?m¥2
z ?¥ ? ?¥ ?
z ?¥
?? ?¥
??
z ?¥?T ?¥?T
z ˉ3??
?ˉ3??
?
z Vn? Vn? /T¨×T¨×
?
?
Class
m
m
z ?-W¥1" ?-W¥1"
z 1 ó1 ó
z ??DW???DW?
z G ?G ?
z
"
" /F?F?
*/0/1 */0/1
?
?
Class
m
m
z Stereotype
e?
e?
z ` ?` ?
z ¤ g¤ g
Object Diagram
z`mD ?mí
?`
^B? ?¥
L
`mD ?mí
?`
^B? ?¥
L
è
^ μ 8
??′??1¥B? 8
è
^ μ 8
??′??1¥B? 8
Yt b
My Washer: Washing Machine
State Transition Diagram
z A state transition diagram shows
z The life history of a given class
z The events that cause a transition from one state to
another
z The actions that result from a state change
z State transition diagrams are created for objects
with significant dynamic behavior
z 1
í1
í
z
?
?
z
?D
?D
z
?mS
?mS
State Transition Diagram
z
?
?
z B?`i¥HqB?`i¥Hq
?¥òHq
?¥òHq
z ??
z
Yq a?T
Yq a?T
z ?T?T
z B?+?
?/`B?+?
?/`
3?¥?1
3?¥?1
z entry/exit/do
State Transition Diagram
z
?m¥"S
?m¥"S
z
í
?`=?yT
í
?`=?yT
z
?m¥G
?m¥G
z ?m?
¨?m ?m?
¨?m
*
_° V¨["_° V¨["
****
7y?è?7y?è?
*
7y? Z?7y? Z?
á? ?á? ?è?[" ?è?[" ?è? ?è? ? Z? ? Z? ?
State Transition Diagram
z
¨?
?
¨?
?
z i?
?i?
?
z ˉ?
?ˉ?
?
State Transition Diagram
z DD
z D D
z h
Yqh
Yq
z 1Hq1Hq
z ?TVr
T?TVr
T
State Transition Diagram
z
?m¥ 7?
?m¥ 7?
z_° ?miê431
?m¥ ? _° ?miê431
?m¥ ?
zV
U
?ê ?¥??
¨?m?
?μ
{?h V
U
?ê ?¥??
¨?m?
?μ
{?h
zOY
?ê ?¥
?iV
U ? OY
?ê ?¥
?iV
U ?
zy ?
?m¥?i|???¥
¨??
y ?
?m¥?i|???¥
¨??
z?a
¨?Di? ?a
¨?Di?
z ?ZD ?ZD
z_°i?
k b_°i?
k b
State Transition Diagram
Initialization
Open
entry: Register student
exit: Increment count
Closed
Canceled
do: Initialize course
do: Finalize course
do: Notify registered students
Add Student /
Set count = 0
Add student[ count < 10 ]
[ count = 10 ]
Cancel
Cancel
Cancel
Activity Diagram
z ?m?m
z ¨?e?
í
?B?V???¨?e?
í
?B?V???
T¥yT??
^
?m¥B
T¥yT??
^
?m¥B
? ?Z?
T b
? ?Z?
T b
z m èm è
z ¨o¨o
z < V?y< V?y
z ?Ty
í
?9
?V??Ty
í
?9
?V?
Activity Diagram
z1??m?
?m
1??m?
?m
z?
^"d¥?
??1y¥y ?
^"d¥?
??1y¥y
z
í
?§×??]
í
?§×??]
z
P¨???]
P¨???]
z??
a?
í
??`¥?o b??
a?
í
??`¥?o b
?
?
Class
m
m
z
L8 ?
L8 ?
z Dù5
5×M1¥ ?Dù5
5×M1¥ ?
z
L
@ ?
L
@ ?
z é?t ?
L
@¥ ??é?t ?
L
@¥ ??
¨??
? ?
¨??
? ?
z ??
MY ???
MY ?
z M M
z D MM1 ó¥?MD MM1 ó¥?M
RegistrationForm
RegistrationManager
Course
Student
CourseOffering
Professor
ScheduleAlgorithm
UML&UDP
z s"d?
?+?s"d?
?+?
z
¨?m
¨?m /xTmxTm /
z ?¤¨ èD ? ?¤¨ èD ? —y ?á
?2D?
?+?-W¥?
y ?á
?2D?
?+?-W¥?
¨?m1
í
¨?m1
í
z A sequence diagram
displays object
interactions arranged
in a time sequence b
z 1
í1
í
z Actor
z
3L
3L
z hh
z m èm è
¨?m
¨?m
z 7?
¨?m
7?
¨?m
z??D??μ1¥`???D??μ1¥`? actor
z??
@????
????
?31¥h ??
@????
????
?31¥h
z??h?
?¥Hq ??h?
?¥Hq
zh??i|?F`
h??i|?F`
z?
T?h ?
T?h
zM?h#Y?? bM?h#Y?? b
Sequence Diagram
: Student
registration
form
registration
manager
math 101
1: fill in info
2: submit
3: add course(joe, math 01)
4: are you open?
5: are you open?
6: add (joe)
7: add (joe)
math 101
section 1
Collaboration Diagram
z xTm¨? y
?í ?MoxT??B???¥xTm¨? y
?í ?MoxT??B???¥
` b
z ?|V
U"dD
¨?mM]?
àμ
3L?|V
U"dD
¨?mM]?
àμ
3L
79F
y¤?| b
79F
y¤?| b
Collaboration Diagram
: Registrar
course form :
CourseForm
theManager :
CurriculumManager
aCourse :
Course
1: set course info
2: process
3: add course
4: new course
MY?T
MY?T
registration
form
registration
manager
3: add course(joe, math 01)
RegistrationManager
addCourse(Student,Course)
MY
??
MY
??
Each course offering
has a number,
location and time
CourseOffering
number
location
time
MY1"
MY1"
Registration
Manager
Math 101:
Course
3: add student(joe)
RegistrationManager
Course
MY1"
MY1"
RegistrationForm
RegistrationManager
Course
Student
CourseOffering
Professor
addStudent(Course, StudentInfo)
name
numberCredits
open()
addStudent(StudentInfo)
major
location
open()
addStudent(StudentInfo)
tenureStatus
ScheduleAlgorithm
1
0..*
0..*
1
1
1..*
4
3..10
0..4
1
MY1"
MY1"
RegistrationForm
RegistrationManager
Course
Student
CourseOffering
Professor
addStudent(Course, StudentInfo)
name
numberCredits
open()
addStudent(StudentInf
major
location
open()
addStudent(StudentInfo)
tenureStatus
ScheduleAlgorithm
name
RegistrationUser
?¤¨ èD ?
¨?mD ?m¥?
h¥.?
?`
? μ¥?T3?
_
ì
,q UI.4?°?Hq ()
{
…
_
ì
,q UC._
ì
,q ()
…
(_
ì
,q UI.)A
U
,q
V
()
}
¨?mD ?m¥?
h¥.
?`???T
?3?TxT
?Qá ?
?
μF?ó? ?
1ù
3 ……
3?s¥