You are on page 1of 162

www.boosla.

com

UML 
UML 
        

   

  

2004-2006

.        


: "!  # $! %&
UML ABC 
>8GH J @ K =
www.nidam.net\sd\umlapl\index.html :L
( ! $ $ -.$  / 0 23
.

( )  %&' $ !  "  


#  
:!  ,+ , -(    +& (*
www.nidam.net\sd\

www.nidam.net

  
: UML      / UML 

(   
1............................................................................................................. 
 

3 ...........................................................................UML    :10


3..........................................................................................................  UML  
3............................................................................................................... 
 
5.................................................................................................................... 

6 ..............................................................   


 UML :2 0
6........................................................................................................... 
 UML
6...................................................................... W ATERFALL MODEL   
8............................................................................................................  
10 .........................................................................................  
 
#$ !"
11 ................................................................................................................#%&
'
11 ................................................................................................................. #()

12 ..................................................................................................................... * 
13 ................................................................................... TRANSITION (# 
 ) #+

13 .........................................................................#!
12    0 
/ . 
14 ...................................................................................... TIME BOXING  
15 ............................................................................................ .4  ! 0
3

16 .......................................................................................... #  1 6+ $
17 .................................................................................................................. 

18 ...........................................................................    :3 0


18 ........................................................................................................ & 
21 .................................................................................................. 8  7 '2
22 ................................................................................... ENCAPSULATION 9

23 ................................................................................................. OBJECTS 0 8 
24 .............................................................................................................. 0 !(

  
: UML      / UML 
25 .............................................................................................. 8  7 

'"
26 .................................................................................................................. 

27 ................................................................... UML    1* :4 0


28 ........................................................ THE USE CASE DIAGRAM  
' $3  !!
29 ................................................................... THE CLASS DIAGRAM 0 )( !!
30 ............................................... THE COLLABORATION DIAGRAMS 1 $
0 !!
31 ....................................................................... SEQUENCE DIAGRAM :

!!
32 .......................................................................... STATE DIAGRAMS   0 !!
33 ................................................................ PACKAGE DIAGRAMS


0 !!

34 ............................................................ COMPONENT DIAGRAMS 0  0 !!


35 ............................................................ DEPLOYMENT DIAGRAMS &
0 !!
35 .................................................................................................................. 

37 ........................................................................... &2 3  :5 0


39 ............................................................................ 0  :6 0
39 ....................................................................................... PROTOTYPING 0 '
39 ..................................................................................... DELIVERABLES 0  
41 .................................................................................................................. 

42 ................................................................. 
 3 , + * :7 0
42 ...................................................................................................... ACTOR .%
44 ............................................................................................  
' :8 3 1 ; 
45 .............................................................................................  
' $3  = > <
48 ..............................................................................................  
' :8 3 0 )(

49 ..................................................................................... #()
! =  
' :8 3
49 .............................................................................................  
' :8 3 1. ?
49 ................................................................... (JRP) 0 !
 A
 !!
#. @ 
51 ...........................................................................................  9($ # (
52 .................................................................................................................. 

  
: UML      / UML 
53 .......................................................................... 4 0 * :8 0
55 ............................................................................................................  )  "
55 ...................................................................................... 0 !
 1  ) %
'
56 ......................................................................................... UML =  ) 
57 ............................................................................................................ 0 '  "
58 ................................................................................................ 0 '  B 0   "
58 ........................................................................................ ASSOCIATIONS ! 
60 ..................................................................................................... 
 0   B
61 .................................................................................................... #   * 
62 .................................................................................................................. 

63 ................................................................. 
 3 , + ! :9 0
64 .................................................................................................................. 

65 ............................................................................. 5   :10 0


65 ..................................................................................................................... * 
66 .................................................................................................................. 

67 ...................................................................  :5   :11 0


68 .................................................................................................  
' :8 3 6.
68 ............................................................................................................  ' ! 
69 ............................................................................................................  ! 
69 .......................................................................................................... '8 C=

70 ..........................................................................................................  0 =

71 ...................................................................................................... 8 >
' 0 =

72 ............................................................................................ & 
 $  
' $3 
73 .............................................................................................. UML = :

!!
75 .................................................................................................................. 

76 ..................................................................  :5   :12 0

  
: UML      / UML 
76 ........................................................................................................  (

77 .......................................................................................... 6  :3  = 0 8  1 $

79 ....................................................................................................... 1 $
0 !!
79 ...............................................................................................0 ' 'G :1 $
E(
81 .............................................................................................  
:1 $
0 !!
82 ................................................................................. 6 0 8  C :1 $
0 !!
83 ........................................................................................................... #8 ' 3

83 ......................................................................................... . # > :1 $


0 !!
89 ...................................................................................1 $
0 !! 0   B ;$
90 .................................................................................................................. 

91 ............................................................  ( 0 ( 


 :13 0
91 .............................................................................................. 0 ' 8   
92 .............................................................................................. 0 $ = H" :1 6!
92 ............................................................................................ 0  
 = H" :2 6!
93 ............................................................................................... 0 ' 1'
:3 6!
93 .............................................................................................  I 
:4 6!
94 ................................................................................................................... :

94 ................................................................................................................... 1

95 .................................................................................................. 1
 :
 "
95 .................................................................................................................. 

96 ............................................................... 6  ,7  $ :14 0


96 ............................................................................................................ !  
97 ................................................................................ EXPERT   :(GRASP 1)
100 .......................................................................... CREATOR J :(GRASP 2)
101 ........................................................... HIGH COHESION # . C '
:(GRASP 3)
103 ....................................................... LOW COUPLING ;) 1
3 :(GRASP 4)
108 .................................................................... CONTROLLER K :(GRASP 5)
110 ................................................................................................................ 

111 ................................................................................ 8 :15 0

  
: UML      / UML 
111 .................................................................................................. 0 ' 'G > 
114 ................................................................................. ; 2 C(  
'  > 
115 ......................................................................................................... %100 6. 3
116 ...............................................................................................................  %
116 ................................................................................................... 1_4_ 6. 3
119 .................................................................................................. >  . # 
120 ......................................................................................................0 '  I
121 ..................................................................................... POLYMORPHISM #

122 .................................................................................................... 6  0 )(
124 ............................................................................................................ #
63
125 ................................................................................................................ 

126 ........................................  1 9<  9  : :16 0


126 ........................................................................................... UML = 
!!
127 ................................................................................................  #  ( $
128 ......................................................................................................... 
 
128 ....................................................................................... 
= 0 = 
' ;$
129 ................................................................................................... EXPERT  
129 ............................................................................ HIGH COHESION  $ C '

129 ......................................................................... LOOSE COUPLING 1
3 9$H
129 ........................................................................................ . 0 (
  $
131 ........................................................................................................... &  !
132 ............................................................................................ 8
  $ 

133 ................................................................................................................... # >
134 ..................................................................................... H  
' :8 3  $
135 .............................................................................................................*  !
135 ................................................................................................................ 

136 ....................................................................... (3  * :17 0


137 ........................................................................................................   ' # >
138 ..................................................................................................   !! (
139 ....................................................................................................... . ) 0 
140 ..................................................................................................  /# ? 2

  
: UML      / UML 
141 ....................................................................................................... # ' B ? 2
142 ................................................................................................................ 0 . =
142 ......................................................................................................... O
0 
143 .................................................................................   0 !! < 2 0  
'
143 ................................................................................................................ 

144 ...................................................................... =  :18 0


144 .......................................... SYNCHRONISING ARTIFACTS 0 ( ) ?

145 .......................................................................................... 9 
7 "  (


148 ........................................................................................ METHODS P  

149 ............................................................................................................... 1 6!


149 ............................................................................................................... 2 6!
150 ............................................................................................................... 3 6!
150 ............................................................................................................... 4 6!
150 ................................................................................................. 9 
 

150 ............................................................................................................... =  


151 ........................................................................................................... ++' 
151 ......................................................................................... UML = 0  
152 ................................................................................................................ 

153 ...................................................................................... ,  +

  
: UML      / UML 

  

<R R 0 $ 


6
$  (6+   ) UML 0 (2
0 R&  (2 2 1 1$ >%> 6* . 0
1 0   .. ( !'
.&
&  &  9%
 7. 0  *  1
&  $'   3 0 
#&'R R #R$  R 9
 1.  $
 !'   ' 

1)
' 7
  # 1   1(  1 1 S 3%$  7. &
!' 
1. &
T6  6 ! ( = 0 $  
 & = ! 
S
1 R$  1 ' & 
 
*  0 !! #> &" .
$  9(
R= 1  G 1 

   8 & 8  0 !! 2 T
'&
. &$ # $
  &&) 12 #  
:1 > < UML  !
&= *'
 1
! 7 " K
 
(
C ! #H=2 7 " A
1 &2 7$ .0  *  & 0' UML
.  !
 0 
R 0&
' &2 1 U .0  8
6 & !

 UML
R& U R( 1  =G V) 1 0 ( &2 1 U   ' 0 & 1
0 R$ 9R
 7. UML  ( . 9I
1 .  RUP 6 $
.%(2 &  1. I ; #  $
 & 1. I ; 
&3 ' 1H &$H
H2 1  XUML ( . != W 
 
  = V 
; R$

R&Y=  U .0  !


6  & = 0 $ 9
 # 
Object ) 18 R 7R #>  !' = 68 '  ) 1 > W 

 R$ 
  ,(Design Patterns) (
! 2 ? 
 (Orientation
6  #    ' 1H & (Architecture-Centric Development) 8

. 4  

1

  
: UML      / UML 
# R 1R 6+ $ & 0[
V  / 12 7 " 2 12 2 H2
0 R& (R HR)
1 U  ."> " 0 & 2 <" T (RUP)
8R
+) 7.  3 1. 9+ $
 1 > ( = 2 2 " T *  #
] 3G ))
.$ & 1H P

www.shagrouni.com/sd/agilemanpre.html

  
: UML      / UML 

UML 
:1
> UML 4 
R R T (UML) 2 T(Unified Modelling Language) 6R+  
( $ /) . I '8 ( $ 9( (  
' 
 R 9R
' 9R' #() / = .(UML = 0 artifacts 7+'

.0  !
0 .  = UML C !
1 9 9(  TUML = '8
A R T object oriented 7R 8  0  *   &
$ ! UML K[

.8  7 _  2 ;$ 9


' 9'
7 "  
 @3 '  TUML #(2 7. 6 I  9' T ( #()  =
4 R 7R. UML C !

 9 <  $ .0  . ( = 
 
.

  ?
# = 3%. K 1 # &&)  T & (    0  & < G 0 . (
.1$  (


  )   : / 1 

 R$ #R R= 1H  1Y= T  !' '  /%.2 6 ( 12 1 U


KR2 " T ! ' 1 U  . # 
  $ #>
&`  #2 1  1 
1RH  # T#  1  T!'  .$
 C$ E 4H 7 " 
!'R . : K 
' & = * a #
WH #  &  $ =
3

  
: UML      / UML 
R'&  T1R' A  .
  &  1H  . 1 < 2
.< G 1&  4 ) 1 >  T0 
 
T1994  1989  . 1 . / #> 1 
) 0  '& 1  T6
  50 1.    1  T"P   " R & "  
6
)  
R. 3 7. 

 # !(   A
& # S # $
' 3 
0 R R= R
A
: K 

( . &  # T03 V) =  T 

.< G
7R. 18 R R R  R ? T 
  
 T7H) 1  
!6   = &
  #  H   0 
/R 02R .<R3G 1R
R 0 & ?%> 0 T0 $'
9(
 =
#R .1 RG 1 ( . 7. 
& 6  # T 
= ?%> 0 &
: & (  63 !  A
&
"A  3" #.  .)
 (
 = 6
 0  Booch @
!
= '8  K 1   TAda c  7. = > Grady Booch
" A & 63 1 U  . (object oriented) 8  7 0 

K  
 ' # G 1 > ) 1' #  `
 &=  12
(! 0' S
#H=G 0  (Object Modelling Technique 8   
) OMT
.)> 0   0  0 $ I2 =  #
=
0  ' Object Oriented Software Engineering) OOSE
$
.(Use Cases)  
' :8 3 7'  

 (7 8 
 #   )  I #  A' &= #2 1 3 '2  
' :8 3
.( )$H 8  7 K= 1 
 R. 6`R ) TOMT V'd TJim Rumbaugh O    3 T1994  . =
7R + HR  General Electric A
 #    #$ A
1 0 
0    1 ;  .(Rational Corp) #    = #$ A  3
4

  
: UML      / UML 
/R& #R$ 1 . : ! 1  ) 6 & = &+ (   =2 P #2 1
4  H2 H T1995  . :.(Unified Method "6 & "  &
R( ) / =2 H 
 T#  7 " TIvar Jacobson 1'   ) OOSE
  7.
1a S 6 & = (Use Cases " 
' :8 3" &)
 O  1 1
  C ) 9 e. *.(Unified Modelling Language) 6
.(Three Amigos) ">%> * 3(G " R 1'    A
R
6R & 02 T!' 0      ;$ 1. I ;
R(  consortium 
  1

= T0  . ( ! '2 < 
'
Hewlett-)   S0  #> 1 > 0 ''d 1 . &= 0  TUML R

.(Oracle) # 2  (Microsoft) 0='   (Packard


0R
 R& 1R  T1979 =

**

(OMG) I # 3 1 UML [





 0'   . UML  0 (2 . A  . &


 ( 7. 0 2   (OMG)
.( 

B

. !
(artifacts) 0 1.  $
 '   UML
.  & P
    

.6  . ( !' = $'  


UML 7

R' R= 0 '  #H=2   1 $ &


+! = #
 T  +U 
.0 

.  8&


    Tmodeling  ' '

R U &   T(Object Management Group) 8  6 B . :OMG

**

.#( )
1  www.omg.org I .0 )(  :H

  
: UML      / UML 

  
UML :2 
7 UML
R2 R 1H
$ H  3 >%> * 3(G 
T UML#  !
.
R= S #R 1 > >
0 $ 1G A  .(process) 0 $ C$

 H3
0 R (R
  = .< 2    ' >  # 3    7.  '
6 
(
   1 > .2 0
  6  C>
0 . !

4 =
R' 'G  R) ! 
f'
 .  T. UML  1Y= A  .
 B
."3 " 7. &$H  0  !

R &+R' T  . 3 2 
6 2 2  ! '  UML  T< 2 6 $
.0  !

 = 7 " A
1 &2 T& .08
#% !+'  process . : # $
 9' T6* ) UML  
' ) $
 
7R T   1  .  # = UML . '
9 &= #   T  V 
.$8   0 $ ;$ 7. 2 6 I

Waterfall Model D 3 C*

  
: UML      / UML 

.D  "D 3" C* :2 

  = 4  # 3 &8 &"    # S=


   '
. &


  $
  12   . 
2
( &
" #&' 
) !'  $ /
: &  2 .4 
&
C ' 3 1 12 &) 1
12  H IG = 7
 K2
7. 8 . f (  $
A   = .(
  6   # 3 # 
.1 +!
1 6 G #  = &I
 6 . #  .  :

(Risks) ! 
* !G f(
)
 
X9'g  . I  
#% (  S $
.1   : ). H 6 (
  1" T &= E  ! 0
= C 
'
  # T6   :  =
!#$ C ) I )
% 6 )( `
0' 1
' #!


  
: UML      / UML 

. 7  , 5 
< G 0 
 7 -D 3 C* H :3 

K R' T4  1


: (3 ;  = 
#
  12 ? T H2
0 * YR R
 7
 .1  0 !
 &= = ( = #>

 6 ! 
KR` # 
 8  A  .1  : 3 $
&
U ( 3  0 !
 6 B  (
P
R 1R 1
  (integration) P  (coding) 9 
# 
' :
.1  K$3
   6  H 8 &
4 R 1 12 !  T   = .   T    # U
Y= T' '2 K  T@  # 3 ")  (" 9 $
12 f( .)  (
  :   7.  = # T =G 1 ( C = K <(
 12 4  12
R 1R R. T( &2 $H ) 6 (3 4  6
= 0  "  T4 
!8 $ !  1 > #H=2 &= . &
3 & .  
R  0  1 .K
" = !'  &) #&'    T Y
.4  $
  12   . 
= 2

 C*
8

  
: UML      / UML 
4 R +(
 ? T (spiral model)     # 'G
6  #R T 6 (R lifecycles 
 0  1 '' 7 " K'
C ! 1.
.)
 # 3 P  (Y &


 -I H J   -$  


 %     4 - : :4 
.?  74  L  1  C K 2  

:'G  :
T9 
T(
T#
) 
 6  #  7. #
 12 #$ C = :!
'
.  !  7. 0 ' 9 ( 1  (

(  TI
 6 (    1  
 0 I% 7. #( 
. !
0 . = $  
# 3 
 0 $(
 $ =  0  0 
G T  6 !  !  +(

1 ( +  U 6 0 
;$ )
!
  
:%>)
.2  !

.   #$ $
  < 9 
 1
.> 1 +$ P   I
 (B
. 2 3 /
1 (/  
  :#>) 4    :H
:   $ .
9

  
: UML      / UML 
0  !
 $ ' 8
9 $  $ / 1

 6 .
  1 > # 3 1
$

 T(RapidApplication Development)
.(hacker's charter) 6  #.
 $
' 1    )= . &
" .  $( >2 $
1 T(Gantt Charts) ! U 0 !! #> 0 .  6 B 
0 

.)
  '2 !

  0 $
 
>2 1 K  '2 7. 6 I  T  $ . A 
#2 1
.(Iterative, Incremental Framework) D 7 D :   7.
R. *  &= :  U 
h )  $
 3 1
  ) 3  =

.#  :3 = =
 T [5]:  ) 
#2 !

D 7 D :  


 R
  (Itreative, Incremental Framework)  
 
#$ !"
#R$ R!" R[
R 9' . (  
>2 K T   !
.V  /  #%  
 

T(Elaboration) #()
T(Inception) :'8 !2 $ 2 7 " #$ !" '
T R
7. !G /   
 .(Transition) # 
  (Construction) * 
R R
 6 R R= #R   !G / 1 !  12  1

R R
0 ! R ; $
'  !G / W  9' '  = . 
. ! # = d 2

D 7 D :  M :< < :5 

10

  
: UML      / UML 

&2 3
 'R .KR  R$ +(R

 4  C ! :H #%&
' ! C$

T6R&3 1 R= 7. !'     1 12 ! & 1 6 ( : 
1R R RG !
 6   :  = .4  = * 7. C )
& $
: !  1 
 (deliverables) 0   .+ 

. +(
>
.1  0  
 8  9 
'
.(   #  ) 4  (glossary) 0  ) 8 
 

7. 8 $ 0 
T  0 d 
TW  0  1H

) < ' 
.(O T >
'
.6 !  !  8  

.4  !
case R'    ; $
 . #()
1 * #%&
' ! @3  9'

.: #() = study

0
R!  R." R= R$ 6! H  T #
 #()
1 ; 
#R`
 X#(R)
R! R & : .K= 6 !  >G C!   $
'  T4 

R' ) $
 &= 6  H V 1  T4  #   . &= 7.  (
.( &
  #&' 6 ( * 2 6 ( K (

 
R' R   .  / = 6   3 & 1 UML 1 1 
Class

)(R !!  T(1  2) )


' 0 !
 = . '' Case Use

 (R
 R
R $  ) 9 
' K 
' H2 1   Diagram
.  3 4H  #  .)
'

11

  
: UML      / UML 

5 

 # X Linear ! '` C
 1 !  .P
 *   T*  ! =
K')  
# .0 
1 '' #% 1 T   '2 V) /d 

# 1 12 7.   #% 1  .!' 3    : 'G
.0   C=

. #  
 12 #` T1  (32

.1? ( 3     D  5   :6 

8R ) #R$
I 7. #( f! 9' 0 
1 . 2  & :
7+'R
0 R
/R .(6 R  #  =  6 I 1
' T: !
!  #$ !" '
0
2  1 TIncrements 0  

0 'R /R . 2 ( ) 0 ' *  1 T#()


 #%&
' !2 = K2 I

(R  R. .6 (   0 


1 '' 2 X  ! V)  
 !
1
#$
'  T1 B 3 !' #()
 #%&
' !2 7.   9' V  / = fH

.!= *  . 0  

12

  
: UML      / UML 

Transition ( 3) N


!  = 6
$ 0 !  .18  7 " 8 & P
 # C$
 8 & !
:1H

.
' 8 # 3 1 
 ; UG 8  0 (B
.#
''    I :  
P
 #
2 T:3 = 0

 
T6 & 3 = &+ (  0   . 3 #
#>) 0   &

(..O T 0  
. 1
'  

.0 $   :
 C'

R R & = 

 !   #+
! 1 !  12 
/
 
12 $ #
 % 3 
  1 12  #+
  = T 
:  ;$ T  ' H2   .1
' =
    1 12  T# 
#R 3 1 B 3 %
 1 12  P
 1  T 8 
 6! !

3
. !  = #

> $ !   >( P*4  


d
9' 1 & 7. 6  2 T1 & 7 " 1. '2 1 6 . 
   

 + T "   ) " : &   
! 7 " #(  $
= 6  7 "
12 7R " 

R'  0  1 $ ? T;$ &H$ 7 " * G H
.6  #G 

 I


R 1G S #R!2 0 
1
12  $ %= /$
   4   "
6+ R R= KR$ #R $
1 +! 7. 1'  $
<
' 1  9'
. >2 0 
G 4  ( 12  A  1  .6 
: 
6+ #! = >
12  
# $ ;$  =

13

  
: UML      / UML 
( = 1 +! !$  .#!2 1
1G 

3 6   !
0 
 
2 T 6
 U 2 6 0 
7. = 
' # .2 * G
.4  


.6  >  =G
. 
7. #$

 6$
 #$ C =
.(:3 1 >2 =) . #$ C =
0 R ) R $ R'   4 R 8  / 7 " H 12   T H2
R'   4 R (R  .#!2 0 
7 " 6 . 
'  (3 $

7R " 4 R R(  C8 > 1 > =
 (" [!
  A   $
 7.  # > .  0 !
 1 $ +  12  4   2 T1 
R
9' C>
# .2 1 =   / )= T '$ G 3%$ 0  : 
R R= & (

   !
 1  S 
6
= #! 1
.$
*.   '8 +. [
  = 1
12  

Time Boxing 7 


.(R 3R()  3 ; =   
 
. 6 B #>G 'G
.$  
 
" & %  
>  6
= 

   'G &
!  .#  2 7.  
* &" 
 T   & :  
#

 "
R= $  ?
12  . 
 & = $    
= G
.  0 
= &H
 &
 U # .G   $
12  T `
 '2
7. 2) 1 d'  1 ! 1 12 T  C !
) f8 ( <"
T 
# = &
!

 
0 !
   
1. ( $  & 1 #3G
.# a /& 1
 9' 1  
.
#R  #% ! H  . +' [!
 &= T $( 2    
 $
#R2 1 R "   [!
 $  1. [
   1 .4 

R  * UB  #> 4  OH    ."%99" K 
  ' 0   

14

  
: UML      / UML 
T0 $  6. # 

" .. 
= 2  K  &) 1Y= T 6  $  # 

. &  2 = 7H) 2


 $8  1
9'   0 
 !!
1 =
Y= Tf( U  T*  B   C$  
12 1   ;$ ;
)
7R " K  #
 U #$ 1Y=   #2 * &
 03  
#


* R " R 1H
 12 1 S 0 
!!   6 ." 
  T
0 

: 8 =  
 . . >2 0 
= H" 2 '
O

!! 1. [

 %= . &
 $  !!
.  ( & ; )

.!!
= 4  2 "
 " 7H) = 4   12  = #* H

T 
; = 
"
.C=G = W
I
 ' $  8  A  12 ? T#  0 &I
93 
' T8 . 6 ( !+ 
= 1 +! 2  9 + '
 "
.$  

  !+ 

 < G $ 6  ?
 12 K  4    f' T' '2 6 (
R 3 0 .  6 " 7 " 
  T*  B 0  " #3 $  K . 1 / 2
.( 6 ( #$

.%   ( +


 T Ra 4  1 A  1
 $ G !G 1 ! # C 
' 12  
.# 
% %10  *   %50 T#()
 %30 T#%&
'% %10  . [d 1

.  ?  %     G)  8 *4 .   ( + :7

15

  
: UML      / UML 

    1 N :


R (the RUP) The Rational Unified Process   2 1 6+ $
/R R!

.   # $
' 3  

 6  6 & >G >2 <"
RUP 1 = A   T UML !
 3 1 ">%> * 3(G " V) # 3 1 &

.UML :   

 T a 1. 9
 4  # 1` & / 7. 18  + T' '2 6 (
 T#%&
'% (3 ! " !

 :  ;$ T%> T)
 0  
 
.0 ' 
 3 &= #%&
' ! 1Y=  '. ` 3%$ 0  : 
HR2 .$ = ! # 9
6 .Y f'
   RUP $
T! / 7

. 
 '  4  =  = # . 3  . #  RUP 

T RUP 7R

R
:  6. ' 
 #    &
3 0 (2 3 
6 R . V 'G 
 *. www.rational.com = #( )
1   " 1
 R R
 .RUP fR% : H   2 0
   7. #  1.
(2003  = = IBM    &$ 
) . 
# ' 7. K $
'  "

http://www-306.ibm.com/software/awdtools/rup/index.html

16

  
: UML      / UML 

.(IBM  6) RUP   :8 

V R'2 1 =  . )( 1  T  '  C !   RUP .    #()

./ '  #% &[



' 
  
 

 6   RUP

B

.
0 $   8 ) 1 $  
 
#$ !" 
.# 
 T*  T#()
T#%&
' !2 $ 2 7 "  #$ !" '
#R R & = #
 # 3 9 
7. #( 9 &
' . (
!
$
.( & 1 . ` ) 

.0 
$      ( '`  
1 0 

UML R
9  T Framework #$ !" 7. 
9' V  / 

.#$ !" = ! # 0   .

17

  
: UML      / UML 

!   :3 


Orientation Object 48 R 7 &) 7. 6 I  9' #()  =

A R T 8 R 7 .


? UML 6+   (
+
 . (OO)
. + = 3 
  9 
'  T UML  = C$
# 3 K ) 9 $
'

2 
#& / 
  
'  IG (

 9 $ ' 6 (
 T2
.(Functional )8 I 7+'e  2)
I  $
[   $  ! TStructured Programming &  =
 R&  R R& 
functions 98 I 1 . (
> T `' 7 "
 +  6 ( (
7
 &
8

 T 98 I / 0[H
" . &  !
functional

)8 RI AR)


7.R
R$ /R . &&=  &
  K= +'

.decomposition

RIG R= 0 R  . &. #$


 4 1 0   7 " 98 I I$ 

'
6  R = & I)
 3 2)  4 1 0   6. 3 = & I)
  6 . )8 I
.(global variables  . 0 +

 R ! 0   I)

I / T&$ 6 B I #+
T !'  > `
:

I 
A  T6 =
 0  # 0 $ = H" &$ = 1 + 
. & C

0    ! #
:
functions 98 I 
 1+H
' #
 )8 I (

8 R 7R  /2 (R


 8  7 1.  $
 8  7  #$
' 9'

. 

18

  
: UML      / UML 
add_student 5   
enter_for_exam  
check_exam_marks   %& '
issue_certificate -. *+
expel_student   1

1

 .98 I / #[> data model 0    7 " H2 
 9'
(R
R. R  T0   0  
  1   T ! 1. 0 $
6

.0   /& I )
% database schema 0   6. 3 !!

 (   H0      Q 


 .  (   1  + 
 :9 
. N  1    I   !   -&8 -R
$

/R 7R. 
$
9'  '  + 
functions 98 I 12 H  2 1a
R

R' (R ! = H") "add_student" )I T%> .0   1 =)(
 R

(6 & (") "issue_certificate" )I  T( !) "Students" 0 

(6 & 
   ! #( )
= $ ) "Student"  ! 0   7 " #( 7 "
. "Exam" 0  
 0    " H2 )I 

' 

.code 9 
#   
 98 I / 12 7.   "_" )' !  
'

1R. R $
 R' notation 
( #$
' 1 9' T#() / #% K2 I

. )

19

  
: UML      / UML 
T0 R  CR= R$
 T98 I # ' 1. 6 . 
diagram !!
. dependency  
. 0 > &= !! 0' 

.(  3  (    -= 9 


:10 

 $R( 1Y= >2 0$


 " &$ # $
 
 `' 12 X  / : 
R ?R'   T/%.2 # > 2 Y= . 
' &
 (  I 7. I= 
0 R  R   R'2 
7 " +d
 ! requirements 0 !
 0 +

.Student  !
O R
1
12 )
  T1  #2 7. #$

I 12 #+
 T# >
#R T8+R' 6 R= 0R  'R #>  1
   . # 7.  ! %
1R Students R ! #R = % O
# 
 12   8 
.' 3 0   : 2 7 " 1
 
.R$3
 U    >c &I = + ' 3 K2 1 : 

&  
1 + R #R  Courses 0 R #  Exam 0  
 # 0   =
R TStudents R ! #R 0   7. (< ` 2  ! ) & 
$
Tutors
add_student 98 I 3 ."  T  !'  
0 $ ;$ ' =  '
 3

RRRRRR)I= T expel_student  issue_certificate  enter_for_exams 

20

  
: UML      / UML 
7. % ' (  $ 1
12 :3

&G `
#$
1 add_student
.: 2 1  1
  3 #
1R$
 &'R :!
' 1 2 2'G  T
 #  1   #$  T "
. 
& >`

' 
code 9 
=  
. 1 2
1. 0 + ' A2 $
12 1  6* #  9 
= !' #$
03 6+  1 
  I = & 3%.  
3 < 2 0 . ' = (3 U
. / ! H & ' 1   $ )
0  () G 6 >) 2000  .  "
(: 2 7 " 1
  1 ' # # 
) !' 1 12 K= ;
) & 12  7
=
7

.3 &(=  & C


 !' 
& 
 0 . 
1Y=

   ! $


1R :R CR ! 1.  / >`
1 #
"OO" 8  7 # 
.  module  3 = 3%$ 0  functions 98 I  data 0  
%>= X98 I  0   1 3%.  H    T/%.2 10 # 7 " I
. ! Student 0   6 1
!
 expel_student  add_student :
)I
: 3 # 7. 3%$ 0  98 I  0    [ 0 $
1+  
#

.R. 0 I & 8  7 0  0'  


 #   0 I 12 $  

R R=  I &  1  T! &  = . 2   K  K 3  


.0 
 0   
 >2 0  *  % ' =+ 8  7 12 X#()

21

  
: UML      / UML 

.!+ H )  = 9  (   :11 

: =     I # I% 6  !  ;$


I = .P  #
. / H
' 1   V) #>
1 >2
# $
<  &$ :
  ! # Student   #>
A  1' T&$
' #>
# : ! ) .(  K
  K 1' #>
#  .I = K$
.( )

T%> . &)8 I * .
' C ! 1. < 2  3 : "! 
" &  
C 
' T ( ! ) Student = (= H") "add" )I * .
' 
 .
"add_attendee" )I * .
' 
' $  T Student    %>

.6  "Course"   '  #>


1 (A
 = H")

Encapsulation =?
1R " 0   = (. 2 
2 6*  W ' 
  K2 T  ' 'G G
K  Tutor +      #>
T%>= . 0   / K$

 #>[ 
# 3
7+'R &)  . ! Student  3 #  $ "age" 0   6* 3 2 ?

R& [   T
 >2 I # #$ = &'  T Encapsulation 9

22

  
: UML      / UML 
7R " +dR 3 0   1 * = !' 
? T  ' & H+ $

 
. . >2  $

 0 

R 12 %>R Student  3 : # $


  P  1 T9
 !' 
R
$
2 !
 < 2  3  1  1  1 2 #   0   

>`
1  T  #  0 8  ?
7 " P  
 3 .0   / 7.
.< G   1. #$    3 #  ( 7 '

Objects (  
R&` R!
 98 I  0   1 0 $
/ 7 "  2 T#()  #%
R= & 0 =  '   / 8 ( 7 "  I " . ."modules"  3
R= 18  # : 18 
1 :3   . = Objects (  .  $
18 R R  R)
 & %>= . behaviour @  data (   K :3   .
R3 7 " f' #+$ 

 T6 6 3 = ! H
&$
 ! 0   P $ 
T* R` "" 12 K H2  )
.   6* HB 6+  1
#+$ A  T+$
.   T  
1 0  T# )3B 2 #
K  )

: '    '2 V) 0 $ / #>


7 0 7 2 @  (   :12 

& R R ! &


3 1 B   $ "0 8 " 1Y= T " K') #  7.
. &
3  C ' 
  

23

  
: UML      / UML 
/ R f!(R *  &  Objects 0 8    / +' T ' &
.Design/Programming Object Oriented 8  7 (

AR  1 R * R') R$3  R=  #   +
 I 12 ?
R
 T(O ( K
 I 2 T1  6 "  I 2 T&$ = #'
 I
. 0 8  7 " &
  &'  $3   $ = 0 8 
.:R3  2   $ #H=2 %>
2  
8  7  T< 2 0 
&R$
2 #R R
1 = (0 !
 +
) :3  +
" K2 $  T  I
R& .RH #  :3  #  1 ! !! 0   T#&'2 1'
.H 

( 
2 8 (RR 6 RR. 7+'RR
object 18 RR RR(  data 0 RR 
2 C R! 18 R &  
)
 0 =+ (
7+'
 .18  Attributes 0 '
R 0 R R= 9 R$ R 9   0 & .18  Methods 0 &
. procedures 0 8 B 2 functions 98 I
 9( 2 )( .)( Class  C '  = & a f!(
0 'R 9R( )(R R= 
 .18  &.  (template) H 2 ! '
0 +'R
2 0%>R
#R 6 H  1
' 
methods 0 &  attributes
7+'R
)R(  1  T#()  = &. [

&$ I = .)(
.Student
7R " R  $  ' 0  Student Class  ! )( attributes 0 '


' code 9 
= .expel  add 0 = methods 0 & 2 TA 
create CR R T 9R 
#R

    .!= 6  6  )( /
objects 0 R8  * R" :< 2 6 $ 2 )( /& instances 0%>
/0 +'

.)(

24

  
: UML      / UML 
.0   3 1 K+(  ' H2 & #  T  ! #>' & 18  #

    


0 RI :#R>) 18  7 8 = (
 V 3 #()  12 1 U
R+ 9R .R " 1 8'G ;$ 
2 " T(:3  #H=2 #>
T
> >2
methods 0 R& R R  R RI (
. &
 
0 8 

1  U  )( '       ;


) attributes 0 ' 
18  7  
' 0  8
0 . #% V  /  #

' .8'G
.8'G / # 1.  B '  T (UML )
KR= R+

 03 = &2  H  = 8  7 9$H !  2 2


I A' 1.  $
. )$H &2 " T18  /)( <
' 7. 3 &`
0 R.  &
  = 0 )( 1 T+ * 0 )( #% 1 I .#
] 
./ RI KR 
 9(
12 & 1   ;) <
' 7. 0 
#%R 1R R'  #. ) &=    K  G 1Y= != 0 )(  
'
!G  0  =
 0 R8  CR[$
  #
]     UML # 3 1 6 .  ? / 

1R
12 R  7. A  # 
 T4  6 [  #  = 0 )(
* R   
 4  = #$ +
:  TA  $ .K   7. 6  3 I
/R :
[
R' V  / = . ! I )I   '
0 )(
.)( (
7
   +G # 
1 l* 0 !

25

  
: UML      / UML 

B

.#& / 
 1. 9

)
 ! 8  7
.0 )( #  3%$ 0  0 = (
 0   1 : 
.0 8  # T)+( 0%>
/0 +'
C    >
. &
&  !  #% 1 T;$ &H$ : 1 $
& 0 8 
.K') 18  " &$
   )[ 18  = 0  

26

  
: UML      / UML 

UML #
 %&' :4 
;R$ 7R. 4%!m  6 (
   ' T UML  I = ; 12 # 3
.UML = ' 'G  )
 ( ) )
 0 ![! 1 $  K2  UML 1. K
I% 
  #+2
RIe 12 #R
e I 12 7 " $ 4+
 =  ' . &. +$
 

1R R. K= A
 0  !
. &= 1  ' )
   1 & "
:%> S  K   #  T =G
1[
1+(
1 

 18 
6  3 
1)
'
1
 [

7R " 
 &   #
]   TI 1 )
   1
&  =G *d #
]
(R
R&) 12 7 " 
 P  T# > # ' 7. .#( )
1 9
 <
'
#R  .7G  
' =  0 $
7 " K
#2 1 I 4H
9R R&) 
= T]# I A' 7. K 
 
+ ( (C[> ) 


 6 )
' 1  1 ?  $
+3  +
12 UML # 
.
 #$
R2 ;$ $ ' 6 I  = .UML 0 !! 1 #3G 7.   !! 1 
:V  / +
: #( )
1  & ;+ $
 9' T: ! .0 !! /

27

  
: UML      / UML 

The Use Case Diagram 


  :+ 



  :+ Q
 :13 

&= .
' I & 1  I A' 9(  Use Case  
' $3 
.0 !
 &= = . '
 T !
 #
#  #% 68 = 0 
T1+(R T1R[) 1 +! 1 % 1[  . $
'% %&' !! 1
.K. # 
 1 (1  ) 1)
'  (1
 T1 
R&= . 
R' $3  0 !! 1` 1 # $
 12   &' / 1
.'
7
  #%&
' 1 * T !
0 . #  #

12 & Y

28

  
: UML      / UML 

The Class Diagram ( 0 




( 0 
 :14 

V A  T18  7 (


 P& G ' '2   0 )( 0 !! '
!!  
'  Y K2 <  9' . &  '  ( UML  +
12  
ER( # $
'  9' S (
  = A   #
  = 0 )(
12 1R  = )
'R 1R 
 $  ) !  ' 0 )( 0 !!
= RHB  .(Conceptual Model  )  &+' 9' ) & .
'
.0 !
 #
3 6 2  )  1 #$
T 
' :8 3 !! 7 "

29

  
: UML      / UML 

The Collaboration Diagrams  : ( 




.  : ( 
 :15 

*R `R  1G   


 " X8  7 P !
 1 

) 9( 1 $
0 !! '  .0 8  1 $
!'  A  1'=
.   
 ! & = 0 8  & 1 $

R!
 . & 1 >2 (    UML   1.  # > 
1 $
(
. 1  T  !' !! UML 
12 <  9' .0 
R. R .`
$( + $ T ("K
 ( #&'  O' P  (
" # ) T# +$=
1 > 12 : T+ (
_  H $ !! # 
 #  #(= (

.6  1 
`
(
0 &

30

  
: UML      / UML 

Sequence Diagram ,  




UML H ,  
 :16 

VR) ; R$ R  1 R$
!! 6   3%. K K
 = :

!!
7R " R
!! #)'2 7 " ! !! .%3 9
 # 1  T0 $
.1 .  I = 0 8  #. )
) 9(   /  = A  T1
 
& TRational Rose  #   f  #> T UML  6 2 ;$
/%.2 !! ' 
.  
?    T1 $
!! 1  c :

!!
.15 # =  !! 1 6   S

31

  
: UML      / UML 

State Diagrams   ( 




   
 :17 

6 Rm 1R T%> .    = 1


12  03 2 = & 0 8  ;$
:
0  <" = 1
12 8H
* H T* )( T*  T6`)!
12 R  T/%.2 # > = S  [$ 0  1 0+
3 $
1 T  2
.(!?  =  + '
" ) "* "   7 " "* H"   1 #

:R #R $
R= 1 R&
12 " T !'  > 
3 8H 6 B 12 U 
.  =     # !.2 43 7 " +d 12 1 0 

32

  
: UML      / UML 
R= ?R  S 0 ' : 2  [=
A&
' 7 " '   U 6 
= S %> 
.  0+
/
. = `   ! = P  12 A   '  :3 
 (
 f'
( +
UML 1Y= T6[$ 1
12   0+
1  
. &
 

Package Diagrams 7 ( 




UML H 7 ( 
 :18 

R(2 "chunks" * 2 7 " +' 12 7 " 


 ( 1  I = I 2
 ! * G /  UML = 
0 !!  f

 T&) #&'2  


= R
' R. R  7. #()
1 > 9+ $
 9' . +$=  !'
." I $" #(= = H Ig

33

  
: UML      / UML 

Component Diagrams (  ( 




.UML H (  
 :19 

2 #(R= R) 


 P' &= S 
!! : 0  !! K 

7. 0  !! [  T . .K= c 7.  3 # 
$ 9  T  I '

0 R) T! R 0 R
 Theaders 0 '
T0 ) ) P   $) 0 
.
!! =   ) 2 ! #() V  (packages  T)

. I 0  $ #(= = !!  '  = C$
 9' T< 2 6 

34

  
: UML      / UML 

Deployment Diagrams 72 ( 




.UML H 72 
 :20 

T%>R . R  &



' 9 !!
K % 1   UML  

.( '   & !'  )(


; $ /%.2 !!

B

R :R & &H $

8  . I 9( )
   6. UML [=
: # 1 ;  
6 
"   $ :  I #. )
' 9" S Use Cases 
' :8 3
   &
 
0 8   " S Class Diagram 0 )( !!
" &
3%.
";$ : 0 8  # $

9" S Collaboration Diagram 1 $


!!
";$ : 0 8  # $

9" S Sequence Diagram :

!!

35

  
: UML      / UML 
&. 1
12  
0  " S State Diagram   !!
"0 8 
" .   ' 9" SPackage Diagram 
!!
"   0  !

' 9" S Component Diagram 0  !!
"P  &

' 9" S Deployment Diagram &
!!

36

  
: UML      / UML 

*+,- / :5 

9( case study '    7. 


' TV  / =  1 *
&H . 

$ 
'
12  . 0 .  7. UML C !

 9
:
!! = 1    T#G #() =

.      
 : :21 

= T%> . ! # = K
" 
' model  # ' :H 3 T !! =
0 R!! T Class Diagrams 0 )(R 0 R!!  .Y ' (
!
: ! R  . State Diagrams   0 !!  Interaction Diagrams #. )

.V  / #% 0 !! / 9 
' '
R!  = ' 'G 0 !  1 = TInception Phase #%&
' ! 

:
.
 d :H
37

  
: UML      / UML 
.business case #. $3   

.4  C ! 

.4   $ )
:3


R 1G  R
 3 
  6 
 4 = .4  7. 
$ ! 
 d 
1
3 #%&
' ! = 6 0 !   T1  4 '` C'
.#$ !! 6. ' 9 ( 1 #
7. #(
9 $
 T0 !
 #
7 " 
 3  '$ G 3%. K 4  T# 
4 7. 
$  # .A  c 7 " T0 * !$ 
6. T ' 0 '  T4 
.4 
R'   ." 
3 K2  .%$= #
 #%&
' ! 12 ;
)' TV  / =
.K   # .G  9(  1  8  0  
 #()
# 

# .2

38

  
: UML      / UML 

 / :6 
0 R 
 &=  #()
 `' 9 
' 7.  
 ( T#()
! =
. 2 #()
! !
 TK. $ !  1 
.' #   /& <(
  f(  !B = ')2 :H 12 
.)
#( )
(  S #( )
= > V  12 . 
+'R .K= H $ !! &)
 12   I  $'  6 I  1
12 

.( C.  # ; $ 6 I : G  Kruchten 1


 

Prototyping (  
R
R . !  '
  $( #&'
 #()
! = '8 ! 
.4  7. #32  >`
1   T   &. H3  !  

R=  RB C! R   $(R * g ( 2 P )  0 '  ."


R   "
. = 2 :  . !  '
= > . ' 9' 4 
prototypes 0 'R 1 R= T  / = (
 )
#( )
= ;

. $

  " # 

   6  1
12 
 R&  )
'R 2 T R   R& ! 1R R& * &
 $  T 0 ' /
.*  ! = & 
'  $

Deliverables ( 

 `'R R+&)
= 
. ' UML   1 1> !
' T0 +'  
. $ &

39

  
: UML      / UML 
RR RR .Use Case Model  
RR' RR$3  RR #G RR
 R$ " RI R& 1  ' 9  T  I K '   &= 7. . ''
.(K !
' c  I  2 T1
' :#>) " 
T  f'   .Conceptual Model  )    > 
R $  ) 9(
9' .1  0 !$ ' ( : ! TUML C ! 1.
!! #$
' 9'   *  . & = 3%$  9  T1  0 !$
! =   )  
' 9' .UML 1 Class Diagram 0 )(
. 0 8   0 )( *  Construction Phase * 
.1  1() = C$
T 1 1 !
'

0  &


 UML  * :22 

40

  
: UML      / UML 

B

$
 (
#( )
1` C 1  &)  c !
#()
! 
&
.(%  0 '  

 
!  $
 A
. =)
. )    
' :8 3  : !  =  . ' 9' 1 

41

  
: UML      / UML 

3,- 45
7%' :7 
1R R. 9R( ! 'R  T UML 0 2 1   
' $3 
 T 
' :8 3 1 . *  #% 1  . I  
' 1 0%. )

.6  H  6 ( TK8 B !!   I #  9(
# ' 7. S (' / #$) ) 1 0 ) 
# $
'  
' :8 3 9( 
  6 .
." ' * "" 2 "0
 ?
" T " 
) :=" :# >
R3 6
$  
' :8 3 1Y= TO ( 
 I   
  " T%>
."  
+ $ * " 2 T"h ( C%!"" :1

0%. R)
 %  (    9' T 
' $3  K!$'  '  
1R
  = &

9' ( W  / . I  
' 1 `
' 

:
 T 
' $3  #>
  !' 
 
UML 1 T $
>2


  :+ 7 :23 

Actor !&
R !/& . &'R) * 
1 0%. )
2 ? G * &   
' $3 
 RI R!
  " T%> . 
' $3  #$)
2 * I   
 R
 R` 3B = T" '" 7'
 
' $3   1   T= (

42

  
: UML      / UML 
6 R .  1 .% 2 7 1' A  7. T / ' 1 1
  7
: !' 1' .% & 
T< 2

UML H !& 7 :24 

2 1 3 .% .V 2   1 >2  12 1 1 .% 1Y= T >2 $



A  1 >2 . c '   & #> T 
' $3  #$)
  I   *
R 1 3 T%> . $
  2 T(+ #>  
>2 &) .% 1 3
R.%  T0  !    I = " 0  ! 9" &'  
' $3 
1R .% T I  ."#.  c" O
1 3 $3  / #$)
' 
R$3  *R 2 #R$)
R'   .% 12 ? T 
' :8 3 1!

R.% #R( #% 1  
' $3  !! #. A  #>
 .$  
'
: 
' $3 


  :+ !3 +&:25 

43

  
: UML      / UML 
1R . : #. )
  .% 1 TIG I$  ' K2 fH  1
R. 1 >2 # 3 1 &$)
1 6   
' $3  12  T 
' :8 3
:
# > =   T# 
  
' $3  !! 7 "   .9



 3 , +  & 
  I0     9 :26 


 3 , +  S?
1R  
' :8 3 #+
! ' : T".% "  " 
' $3 " 9 $
! ' 1"
 1+  2  
' :8 3 12 
. " 1 $ $
9' TUML  #%
.6   6 ( 3  
' :8 3 1" .`!  . &` C 12 1 !' 2 &2  T#&'
C !   +(
1 
&" . I  $ C ! 
 
' :8 3
.#  !
.

44

  
: UML      / UML 
1
1G #
0 !
  1  T0 !
  &   
' :8 3
:8 3  *  12  T*' #  
  '
     & 
. 
>2 &$  
'

  * 2 12 $  .#   I #
 
' :8 3 4
!! 1Y=  ./ !
   I      
' :8 3 = K
!

.0 = 1 # 
  
' :8 3
T &' /& !!   ) 1 !  *%$ 1 #( 
1 1
&"
.(K&= :!
' # =
12 <  9' S !
*  0 . #% !
C = 
 
' :8 3
=  :  1
'  T !
0 $  ) $  >  
' :8 3
.K$(  #
 T !
= . !!
& 
 
' :8 3 12 9 <  9'
.#$   % 03 
 f'

.  I 0
 *  V 'G 
 
' :8 3
!#
 2  ." = . '
 
' :8 3 1Y= T 2
0 R !
 1.  $
 '2 ! '   
' :8 3 1` 0 * . (
 U
8

! 
' :8 3 1   K.  U 3 & # 1 # 12 fH  . I


 3 :+ H 8 R 
T 
R' :8 3 = > K. 1
12  < 2 7 "  
$( 1 1 3
7R.  2 T 
' $3  1 12 
'   I 1 #. )
# 7. # T%>
R 9 R( R c R` T%>R 0%. )
# 
12 6   
' $3 
 1'  . ' 12 
' f' ATM  I *  
 TATM a
: (
 = $8  0%. )
1 
.

6 R
  $  [9] :  I .0 !
 6   3%. &  
' :8 3 1Y= T  U

. 
' :8 3 #% 1 0 !
 4H

45

  
: UML      / UML 
3 ! # "
  3 # "
! E  

! E  7. `

3 ! 

#(  2
"  3 # "" #>  
' $3  0 ! / 1 # 1 12  #

> 0 
  :+ 
 :27 

:8 R3 1R R  R.  


3 T  . 
' :8 3 *  . 
`! 
R 9' T ( 1   I 2 = . & U2 = &   T6 (  
'
. =  . $
1'  T 
' :8 3 1 H .  1+
3  ')2
7R.  
R' :8 R3   1G 
 T  6   IG = 7
 $
 $
6R.    12   
' $3  1  
  ! #H=2 .12  "7.2 <
'"
:  = 6 ) 

!& P  H 4  $ ! 
 3 :+

46

  
: UML      / UML 
/ 4" : d' W ! 12 1 TC '  > 7. !' 6.  / C !


R R "  R$ &
 1 9' .  
V T ' 1  9  " 
.#(   ("
R& 2   = K2  9' T< G  
' :8 3 7. 6.  C !

12 R   T  !  


' 9 .
' /  9& 9(

! 
' $3  K. 1

7 8$ 
  :+ :28 

T")8 RI A)


" 7. $
3 2 ? T  =  d 1
3   /
< R 9' . (2  (2  & 7 " &
 6$  & '  #

 ?
03 7 " 6! / A
 12  1a  T &)
1  
' :8 3 12 
.*  $ K= 2  

47

  
: UML      / UML 


 3 , + ( 0
 0%. R)
1R. (R #R( )
1   . 
 
' $3  #
.$3  &

0 (

R S > / 0 
 2 # K. 1 12   
 UML12 I%
 #$
'
9'   ' .9 & '  ) /
0   2 0 .  : 
:

 
' $3  '

 
' $3 

 
' $3   9(

(
 9(

$3  #$)
# 3 =

12  
!  9(
 
'

 ' ! 

 
' $3  * &
 . ?'  9(

 ! 

>2 C= &  `


' 
 I 0%. )
8 3

' 'G 0  

T" '" $3   ' T%> . . 0 (



..   T"  3 # "" T"3 ! # "" 1
'
.
  0%. )
 9(
T$3
 U ? 2 :
. 
 0 (
 9( 
. & d 
1  2

 0  
8 >
' 0  


  :+ = C* :29 


R 9R 
 T 6$
 6 (  & T0 
 E( 
UML 12 7.  # > 

.E( / # $
'

48

  
: UML      / UML 

0  H 
 3 , +
 
R' :8 R3 1R 1 . 2 
 #()
! = ' 'G   
f% 
 = T"( C.  # ; . " :2 
. = 2 : .
R  #( )

  1 1  S  
' :8 3 1 1 . G  .
.68  0 $
 #> # 
7. . ''  . 
' $3  #
:8 R3 :R 1R .% )  
R' $3  !! 
T =  1' T  / =
$    1'  . 
' $3  # (
 9( 7 " = H" T( 
'
:8 R3 R
1R R&
   .*  ! * >2  
' :8 3 3 #( )

.0 !
 / =  $

2 1 `
 0 !
 &!  T 
'
TR $ 6 ! R 0   
R' :8 3 ;$ 
3 " T  / =
9R'   / = &  2   
" 1" . &( )
9 
' & 1 1'=
. !  6 9)
7. . '


 3 , +  "
: d " 
 
0%  #% 1   
' :8 3 7. >$ C ! <"
R= 1 !$R' 1)
 1( 1G T $( & / . I 1
 1
'
1%R$    7
)  I K. 1 12   #  1
)
 1
( UG
!(  V) =
:R 6 R  0 (R
   1H

9' !
0 . I$ 1" T`

 6 d 7. & #( $( 1 K2 ? 1 .K & 1
'
.#$   :  $ >2 f (2 c '2  = TK    I 7. 

(JRP) (  @  


  T
Joint Requirements Planning Workshops (JRP)

49

  
: UML      / UML 
 RI R3%. 2  
 & 1 $  =G 1 .  :
#$   '2
/R R=  = # (stakeholders &'G   ) :   1'  / !
 
.K  12  I 7.   = / I & * !.B . . 
1R .1'R R / #$ @  W  W
)
 
 0   12 1 `
#% 1 .  1
&$

 1  # 12  T' 'G 4H 1.
.#R  R( 
 * a / 12  T &8 c W !
!1> 1   1 1'
=  C>
& 7 
  T0 '  / #$ @  = H2 H  1'
12  #H=G 'G 1 T   3  #% 1 K$  3  .0 3 
 s ' P  2 ('  6 ' 0  ') CASE 0 2 <" ! 

.6   0 !! '  ; .
KR    1 7
 T1  # S   2  
' :8 3 !! ! '
. &' # !! &)  $
' 7.  3 1 12  T' 
: #$ @  '
&'  !
1
 1 .% =  ; $
' *" 9(." 2 
 12 .1

  
' :8 3 =  ; $
' c  9(. T $ .2

 T. # 3 1 T =G W !  9($ . 1 * &
 #  .3
.6  6 = 2 !' = !'  9( U ( #% 1  
' $3  # 

.2 = &$H .4
. U ' &'. 1 2  1 0 !
:#$   # $=  f8 ( ;$  =
1 K" .!3 $ 
  :+     H 8 @ 0 2 3
. !
. * >2   
' :8 3 1  * $ !
50

  
: UML      / UML 
(  2$ : + *2H -3 1
 H 
  :+  ,   *
2 ( U &` $
 
' $3  2  " = 

 .
  :+
(! & "    "  > $
9' :8 3 /) 6 
R 
0 R$ 68 = 12 
 T1 '
 1 (
0' /%.2 f8 (
!6! # = %100 ( 1 12 !
  * # 12  iterative
*

4* =:  

9(R. .  12   1 :3  = X   %&' 2 V  9($


R=  R .  
. 
' 'G f
) .6  !  ." 

:  9(. '
3   =G T* U 2  U 1 K. 
 < &  T =G # C>

6
= $   $ =2 7 " #

  S c  1 = ! =2 .


'
3 )' =G T H2
leapfrogging ideas  g > =2 7'

' #  1 S & +


$( 6. 3 / .* a  2 
 2 
 
.   :8 ! <"
"!@* 8  0$ L7  - G  *4 -3 ..."
3 * a # 12 7.   12  1
 : (2 7. K.   12  C'
.  0 3 3 . # 12  T ( 

# $
R' R 1  =  
' :8 3 #.     
' TC '  =
.K$

1 1R 7 " 


 &
%. 7. =G W ! . $
Brainstorming  9($

(
 ) . &
 $ < = )
2 ?

51

  
: UML      / UML 

B

.K$  I 
   # $= '2  
' :8 3
:8 R3 4R = # R R)  RI #. C ! 1.  $
 6
  ! 
.(1 .% =    X 
'
.0 $


 
' :8 3 = > < K
 12 7 " 

.#.   = 1  :   
' :8 3 *  ' #H=2

52

  
: UML      / UML 

9
7%' :8 
 R$ C R! R : 7.R
 2) Conceptual Modeling  ) 
/ .  I = G 0   )  Y 
&  !   (Domain Modeling
.K  1  #. #   " .
 T >2  &= 7. . '
$

R 
& T )  $  7
 2 9  
 UML T< 2 6 
!R! R K 
' ( 1   . 1. & $ 
U (
class diagram. 0 )(

UMLH ( 0 
 :30 

object oriented 18  7 (


. G W
)  0 )( !! * 

8 R& code 9 
  $ #& ' '2 # 0 )( !! fH' .design
.K
' 

53

  
: UML      / UML 
1Y=  T(#
   )  I (
> &  T  / = T .
 T8R  !!
 32 1'   / = / .Y '  0 )( !!
.8 & (
2 7.  1

R 1G TR  / = "LinkList" !


 8  )( = HY  1 T%>
.  6   6
= = 1$ #  
7 "  '

12 1  1  ! =G   ) # ( 7 " 9& T )  =


: ) / #> 6 >G ;$  = . &. 9 $


$(  3   I = :
  C'
 I = 
% "  & = 3 6   $ 2)  6  #
 I =   1 !3
("!1
'
2 # 1 6 "  I = )  5*
9    I = HW
:  )  8' >G ;$

 I 1  0  !  Y   

$ ( _2_L :
* #$)  I I Y 
> C8 3 5 I


(  $ " _ 

#  I =  1  0   8 $
&= 
 
  7_(  _C*
C+'

 0  ! # 8 3 


0   6. 3 # 0 $_ 
:  6. 3 #H=2
!20 Y I$  H - 7    G) W 20  *

6 R  1R! T I
 1$!
'  S  )   1  1(
7R " *! R #
R'  )  1`  <  9' .(
PH # 
. *  !   : # 
 (
0 )( !!
54

  
: UML      / UML 

4 0 


 #R$ @  H=G  
' :8 3  B 'G V)  
' f(
.1
& 1 1 . 2 H T< 2 6 
#  .0 
 /  (  Brainstorm  9($ 1. 
 0 

6R.  C !
.W
3 # 
 3  . 
 T* a # W ! 1 * &

 R 1R &) 2  $ "  T1  H  1 12  &) :1`  
.(
7. ' >d  #  $ "  T `' C !

(   4 0 B&


 
Craig Larman 1   A  W
 . ) *   ( 0 !
 > $

:0 !
 1 
 ) f
([2] ( )
''    0 8 
1 G
0% $ /0  
(0 $  9I T1  )  =G 2
< 2  ) 0  
(8  0   . 3 #>) < G   IG
(@!. #>) 6  * 'G
I
0 '

(8 ! 0  :#>) ? G
0 ' '  f8  /. 
  ( 0 ) / 0%'

R  R !  ) : T* # # 3 T !  ;$ 7 " 6 B 

12 ) K2
. `! 1 K T6 0 
3  /%.2 8  . )$H '2
$
55

  
: UML      / UML 
. ) &$ &= 6  0 $ ;$ #H
3 : 0 !
 > 1 C!
.  K2  1    7. #( 
.R> 1 5  < (  %
' 
 12 1
 1' 
 1 > T  >
& $    K2 1 U  T  . 20 1    & 
' 4   ! /
KR. P
' * 'G / 1.  a ? 1` * B ( V K2 " T &
  =
1R R> &=  $  T9'g .classes 0 )(
 T ) 1 6 8 3
 / R >  9' . a  ! / #> :  V
  ;
! $ $ 7

UML H 4 0 C*


/R R( ) = $ 
 T ) 9 
'  9 2 12 $  T1a
.class diagram 0 )( !! '8 f% 
' 9' .UML =  )
6   9 ` ) &) ' =1 . C= T!' :    &) #>

.:  7.2 = (6 .

(
    9 $ ) UML !  Race "  " 20 :31 

9' !'G :  .  (2 1  1$     :  #  12 I


:R  .0 RI R$ K  
' &) attributes 0 ' (  3 #$
'
R&) 1R   T < 2 6 $ &) behavior A' ( 
' )'
/R #`
 9'  T6$ 6! K
= (
  2 &) A'  
.K$=
#R CR .R  A  V A  .*   (
  7 " #( 7
 6!
.1a A'

56

  
: UML      / UML 

UML H 20 @  (   :32 

 "R' " 0 'R 1R 1> K runner C '


 # 12  3 T/%.2 # > =
"C '
"# 1    . C 03   7)' ! 
3  ." $ "
.K$) 12

(   
'R 1YR= T< 2 6   &) # (  0 '    12 7 " 

.A  C
' #H=2 UG = 1
' 3%$  :  9(.
T%> . 2 c &)  &
  = ' 1  "  # 0  >
 T U
R> ." R " R &=  ) 2 12  3 1 $ 6 B I ( 2 #
:
 T"
"  K ' 
3

"!"  ,   20 :33 

R. #R A R .&) H2  "


" 1` #  3 2 1 T    
&) 7 " ' 1 &
3

 T/ #>  H3 # . 0 3   


=  0 ' 1 $  

. c &) :( = TA A  1  " : &` C  12 ! '   (

57

  
: UML      / UML 
 K2  T  &') * 
1 #
 6 . #  # 7. #  1 4 
!0 3  / #> 7.  1> 03 . H"  1 V

0 20 -!    :34 

(   M ( 
K
 1 0 '   ) 1  
   = . '
3 
  . 

&) :( = TA A  1  " ./ C )


 `' > C %= /%.2 (
. c
10

.0 ' 1
 6 . 6 )  0   3 G  strings #

' 1
= T* 2 #$= &  &) property (  0 "
"  6 '" .' 
"' " (  12 H    T" " &) = %>
 #'
3 #> 6 ' # 1. 0 $ 1

 G T&) #> 

. &

Associations 
RI R2 = .;$ &H$  ) !
) #  
 
6!
 R) :R  4 1  ) 3%. & 1' #3G 7.  ) ;$ T!
:1
1&) ) T1 $ 6 " I 7 " 6. T%> .< G

.* . . ! &.
"     . 6. 3 / S 8  V 1

58

10

  
: UML      / UML 

 1     4 0  8 :35 

#R T & I !


( 1    = KG T1 !
 1 &) 1 
.  6 '  
! &H$ 1&) 1 #( #% 1 UML = 3%$ / 1.  $

:
 T(association  7')  )

 3 " 1  "  " " :36 

= #  ' K ! T* # # 3 .!  = &


I%  1 & 1 8
9(R
 R3 G /R .! = ! =  3 2 A  T  > .drives "" T  /
# instances 0%>
K W' $  
 T! & cardinality   B
.&)
/ R
 R=)  T"6R    6 '   #" 1` # 1 T# >  =
"      6 ' #" (V $

 
#  8 :37 

59

  
: UML      / UML 
T(R  & )  X"1 $ 1 >2 2 1   #" 12  T/%.2 # > =
."   # 3 1 e # . #"
12 R T $  ! 6* 3 
 . S# & 1 12  ! #
1 $ 
 T!   1 . 
. T H2 .(1  ( ) 6)  1

* )"  &' & /& )$H   


' "R !
 " 2 "K " #> )$H
.  >2 * '2 !   1   &. 9 1 1  * !2 2 # 

 ( 7M
. R
AR R
Cardinalities 0   B 7. 3 2 
 TV 'G
.0 R #R   0' &2 U T>G ;$ 8 3 
!! ; $
'
R #G ."1..*"  "*" 1R !' C ) I .many "." 7 " 
* %.
R  2 T&) 0 '
1 . ` W ' 7$ = T"." 7 " ; U #
. >2 2   $ W ' H $ T 
>2 G .$ 3 


( 7M  8$ :38 

60

  
: UML      / UML 

   C* 5 
2 2 ;
) . ) 1 !  
&  I 7. 6 I  T 2
 ) . .1 $ 6 "  I 
 ) 6. 1. )  =G W ! '
.(fH
 0 ' ! 
) / 2 # = /

 : 1 M 4 0   :39 

R&) # $   " " 1  T ) 2 "0 >


"  A  #$ ' #H=2
4 R TA  1  " " 1&) 1 1 3%. 
#" ')2 #`' .K  c
..  B 4  T & ! '
= =

.# $ 1 >2 2 1   # T$   : 0  3%.   #


.6  6 '   # T$   1    

. 
 ' = A 
  # T$  D   Z !    
. 

1&) 

 12    / = :8  `! . # 
 7
  
1   .C 03 ! '
A

> & ! ! ' > T3%. &


6 R= 2  1 1 XT!! ' 1 &
   K2 9
' .  #$ *.
. 1 #$ * !H'  T(
U ' #> 6 . 
' ) & /(  .

61

  
: UML      / UML 

   -  4 0 C* :40 

) ! 2 .0 ' 1 2 #32 !  12  *  . 


 12 & 1
. & )U" 
0 ' A 
$( 1 K T(
. K. 
' #&' 1 1'
 T"! R
% " !  1  * )H" =  
  1 1 3 T c 2
  12   6 6.  1Y= A  .  " >2  $ !! $ 
 1

. H >G !  0 >


    T0 '   ) 7.
 "6* 3 6 ."" . 1  7$  !! 1 12  T  & .
. $ 

B

. `' C.2 #
#2 1  $= '  ) 
.(
    $'
' T 
.code 9 
*  . 0 !$ 2 2  & =   1'
. 
' :8 3 =  #$ @  0 

' T * 

62

  
: UML      / UML 

3,- 45 ==< :9 


 !' iterations 0 
#$ '
 9  2 #$ 1 > 
V  / 0   =  )(  '   &'
 (
 T6 $= 
# = .   
' :8 3 7. 
  B
%R$= 3 3 1 T $= 6 (  " . 
' :8 3 1 != #
  9 

R K     * 0  $ 2 0 


7 " #$ '
) 

.:8 3 /& <(


 K  

  

! 'R  
.rank 
 
' $3  # * !.Y  T

 !!

(R
) Case 6 2 2 . 
' $3  !
K= 
'  
7 "  3
. 1 * 
( f

9' 6 ('  6 '


# R R= = $  6  .
(
) $ '  
> . 3 

2 1R. 0   B ;$ / .
/ 
=    $
0  8

:(    !

 12 T7$ ) 7.2 
d !."   
' :8 3 1
 $ 6 !  0   
' :8 3
$ ' '2 $

 
' :8 3
 I )8 I 1 $'  0  ' 1H


 
' :8 3
6 
2 T )> > !


 
' :8 3
"$ ' '  "

'   8 $ 0 
=  ' 1 3 .0 
6. 7 "  !
# ' = 

 
' :8 3 ;$
.  
&$' %=
  9 
 (
.  
' $3    
*R ") < 2  
' :8 3 . # 
' 7. 
$
 
' $3  12  ' 2
.(A  7. 
# > "#

63

  
: UML      / UML 
$HR 7R "  
' $3  '

 ! ' #   '  12  = ;
)
R>%> R . R !

' 
 T
H  
' $3   T%> .O'
1R  T6R) R& d
 
' $3  # 
 T 
#  & = .0 

.6  
:" ! C%!""  
' $3 
(2 : 
) 9& 

' W ' 21 '
(3 : 
) W%' &

' W ' 1 '
(5 : 
) W%' C%!Y 
' W ' 1 '

B

.6$
 0 
. .    f'
 
' :8 3
. & (
= &
 2 
 
' :8 3 # 
!$
.(  
 
= $ 7.    
' :8 3 

.7 G  G = . '
9'   0   B ;$
. 
1 >G 

9'  
' :8 3 ;$

64

  
: UML      / UML 

 &/ :10 


.  K$= !   TK$ 3  :  9' T ( #()  =
1 T1 3 :'`  `' &) 
 T Elaboration Phase #()
! =
 TUse Case Model  
' :8 3  *  3 .6 > #( )
= # U
#R T 
' :8 3 #( )
#  *#   . 
' :8 3 1 1  >2 `2
.$3  #  )( 3
R( 3 ? Tconceptual model  )  *  0  
6!

0 ' 'G  '  )   . !
= . 
' 
 )
.(
&. 
'
0 R G !! $H TA  #% T 
' $3  # 
* !.Y 3 A  $
. 
' $3  !


3  
 T ! &   $  * " ;
) 1 .#()
! #
 &
R! #%R 9R
 3  # $ = . 2 4  = 
' 
' "  1`
A  9
 12 #H=G 1   '  # 
:3  = :!
'  2 #()

!9 
 & = K)
 12 1 1a

5 
R&= 1R R   I 2  T
 *  
 T*  ! = 1  1a
.1  8 / 

0%R =0 =R
1R '' :
 12  #$ (
  $ 
! 12 

. 
# =  !

  
' :8 3 1 ( . : T waterfalls 6 (
. 
  !B 
#H)  T#$ 
:  9' T 
#  & =

65

  
: UML      / UML 
 & : (6 6 ( T $ ! T ) #$
I   f!' T7>   =
. 
#
.UML   < 2 6 $ 2 C8 > 1 . P

' C=
1   #
(  2) :'
>`  
' :8 3 ;$  .Y ' T#
.
   T Class Diagrams 0 )( 0 !!  .Y ' T(
.
State Diagrams   0 !!  TInteraction Models #. )

K

 
3  #$ 9 

Y ' T Code 9 
.
1R R !  R 1R
12   
' :8 3 #) 

 
 >
.$  7 " #( A  $ T( &H $
'

B

RI 9' .*  * 1  1 1a  T Elaboration #()
# 
' 3
.*  0 . = ) 9 <  6 7.  # =

66

  
: UML      / UML 

 : &/ :11 


 
R' :8 3  > 6  7 " 
' .#
 *  ! = 7 G  
7R. 
R " .:8 3 / :'
 1'
  T 
 = & ' 

 1 ' T  
  
' :8 3 1 != ( $   #( )

.  03 = K
  .  $

5     :41 

6 R / 12   #
  =    1= T*  ! = " U T 

` 12  TA  .#()
! = K 3 
#
A  1 %()
>2 #

R = I 1 1" .# V  T `' 2  1


& != 2 
. =
.K ' 9 1` C 1 T I K  12 

67

  
: UML      / UML 


 3 , + 1 
#R`
R 3  6 (R3  
' :8 3 
Y 3 T Elaboration #()
#%
(R%   ' !  T# C=
T' 'G C=
#>) #( )
= ;
:8 R3 != 1 ) #( )
=  # 
' 03 1  1a .*  !  
` 7

.( 
 = &$ # $
' 
 
'

1  :H

: 
' $3 


 $ 1$ V = 7.   
' 

: 9(

C '
1 

:1 .%

R2.3; R7.1

:0 !

: ' ! 
: ! 
:'8 C=

: 0 =

:8 >
' 0 =

4 ,) -17 


  :+ :42 

.KR
8 $
R R&= 1$ '3 #  T6  
' $3  # >  /%.2 #
R$3  = I .  T # >  
'  &
8 $
. fH
' #H=2
: 4 ,)  
'

  
&   
' $3  `
12 # 3 d )
'  
 I !  '  9(
:
C ' !  
 1 3 T1  :H # > = .:3  =
."W  K') #'
 3 3 
' "
68

  
: UML      / UML 
R.    12 # 3 18  %( 1 C
 12     I 12 TfH 
A R T 
R' $3  1 * 0' 
' 1 C
. T . . 
.  . 2
12 # 3 K

3 !  1` 1H 12 

3 
<  . 
' $3  * &
 $  I &. 1 
  % !  9(

T1 R :H  > = A  7. .H  ( C% !  


 
 12 9 $
:
 C% !  1'
" I # 3 1 1  #'

 TK  :H 
' "
% !  / . 
' $3  0   ' TC !  1 >2  3
:# > .if then " l" S1  ""   
' &)( 
 )

."
'  ' * " 
 T l" T  
' 1  ""
."
' 0   ?

 T l" T%' 
' 1  ""

  H 
R$3  * R>2 &.3   2 I
 ? G 0   '8 C=
'3 9(
RG ;R$  
12 T"1  :H"  
' $3  = T:3
 1 . 
'
= R ( 
' A  3 .  *  Y 
'   .8!   !
>G C=
T  = 1 T
. = 2  ? G / # .1  :H
.W  K  :H' 
' 12  /  
' $3  #%  

C=R
R R= . I  .% 1 0%. )
#()
 T'8 C=
=
:"1  :H" $3  '8
1R R 0 3 ' 8 3 ! 
 T1  # 3 1 1  :H #%&
' . (1)
  7. &H . (2)  T I

69

  
: UML      / UML 
R8 3  RI R&I (4)  T [A1] K. 1 '  C ' 1 
 (3)
C '  = 1 '

[E1] 1  E  #  [A1] K. 1  C '
 V ) 1 
 (5)

`
 '  I ; $  (7)  $ `
1  =
'  (6)
TR  / = .0 ! 7 " K
8

3  I  .% 1 #. )
# 12 I
 [A1] 0 R%$ . 
R' R$3  'R8 C=
= 0 ! : '  
.8 >
' 0 =
  0 =
7 " I . T#3 $ &H

'[E1]

  ( H 


1R ) > #3G 0 =
  0   2 Alternate flows  0 =

: K
! 1 > = A 
  6 . # C=
. 
' $3  #% (

A R 3  .# C=
C! & 
! K
 A  T'8 C=

12  'R R .[A1]KR
#%R 1 T/%.2 '8 C=
1 (3) 6! =
HR2 KR .$ *  Y  3 TK. 1 '  C ' / 
 . 
'
.1  E  3 # " K. 1 . T5 6! . $ *  "
$ *  Y 
'  "
"1  2 :H 
  <S C ! 
2 :RH 
R  CR% !  = 
# C=
1. P
 T  / =
11

.1 

R
% !  V)  K. P
 # C=
1` # 1H) UML '  ;$

11

4R 12 #HR) ;$ .)


 C ! & !
7. UML  3 7. c # >  .'8 C=

./  C !  2 K. P
  T. #32 1 1 * 2 1 # C=

70

  
: UML      / UML 

 8 3 ( H 


C=R
T< R2 6 $ .8 >
' 0 =
= &)( 
 8 >
' 0  T 2
dR 
< 2  ! 1  ? 43 . 2 T`! ? . 
 12  
.K
:
* >
'  1 3 T"1  :H" # > =
R$3  R&

 
' K 

 .1  !
)  
' ( (E1) "

" 
'
:R 8 >
R' C=
0

    .9 
 7 " #
 .
Texceptions 0 * >
R' .

'  0  " P  = 0 * >
'
. c  )   ++'  =  #> &.
> 0  1 $

71

  
: UML      / UML 

2  : 
 3 :+

1  :H

: 
' $3 

C ' 
 $ 1$ V = 7.   
' 

: 9(

1 

:1 .%

R2.3; R7.1

:0 !


W  # #'

'  3

: ' ! 

 I # 3 1 K'
 1  :H 

: ! 

8 3 ! 
 T1  # 3 1 1  :H #%&
' . (1)

:'8 C=

  7. &H . (2)  T I 1  0 3 '


&I (4) 

[A1]

K. 1 '  C ' 1 


 (3)
C '  = 1 '
 8 3  I

# 

[A1]

K. 1  C '
 V ) 1 
 (5)
[E1]

1  E 

 I ; $  (7)  $ `


1  =
'  (6)
`
 '
.$ *  Y 
' 

(A1)

: 0 =

1  2 :H 
  <S  ! 

' K 

 .1  !
)  
' (

(E1)

 
' $3  &


  
  :+ = :43 

72

:8 >
' 0 =

  
: UML      / UML 

UML H ,  

= (   $( 1 V  1 > .$( 2  
' $3  0 )(   ."
&& R 3  
' $3  0 )(  f (
 > (
 #
1 C )

.(
%(2 C$

0  1 >
:"1  :H"  
' $3  1. # >  =
:  0   6. 3 %$
'  I  .K. 1 '  C ' 
'
"

"C ' = 1 '


 
array =)(
6 RB  C 'R 0   6. 3 1. ?
 . . 
' $3  *' 9( 
.6 (
0  ')2 #  1= T0 =)(
R T"R'2 C(" K`   I : # $
 12 . T 
' :8 3 *  .
#R$ 9 (1a 7
) &  1 .K P8
 4  "  .% 1 0 ! # 
'
.0 !  
#2 1 'G C(
= Sequence Diagram :

!!  
' f( 1 TC '  =  
" .(
  = (  T 0  6. = ) S 
2 :

!! .UML
'G C(  #
= . ' #
. !!  
' 1 T . K2
:!!  #$ 9 <  9'  = . I =
' 7. .% :H
!! 1 7. T!!
:   I #  1. $
. 

73

  
: UML      / UML 
" !!" 9H T $
!! ..

timelines

/ 
 1   #>

.#)'g

 I  
' 1 #. )

1 &' ! K.  $


..%   I
#. )
9( 
 

.! 6  

74

  
: UML      / UML 
0%. )
= H" = 
'
.1 ! 7. #)'g
! 7. ! 0 $ 
1 7
 7 " 
1
!  I 2 .%
2 K
 .active
. 2 >2 1 

T1w  ' 2 (


) 2 & V $=
# 3 1 0 $  / = H"
.((
6 2

C=
9( #2 1  
 c &' 
& 1
' T:

!! 1 * &
 # 
#R C=
# 0 !! /& H '      . 
' $3  '8
. 
% 6 > 2  6$ #8  &   = A  C
'
&2 U T8 >
' 2

B

R=  
R' :8 R3 ;$ 7.   .*  !  
 T#()  =
.   
' $3  !
&
 
#( )
)
'  T 

!!  12 2  T 9 ,  
   T UML !! 0 ' '2 $

.()  
' $3   
. 6 =B K
 R
" R
  1
' T 
' :8 3 =   #( )
 1  1a
.= 7 " :!
' 1a S *  7 " $!
3  .#() (

75

  
: UML      / UML 

9 : &/ :12 


  
&  ' ) & #  " #  
 `' 2   $ ` #  !2 T  7 "
1a 1R  T &( )
= $
 #G 
  
' $3  8
3 .( 

. `' /&   # (
1 
.  T  / =  .0 8  0%. )
" &. " 
   
' :8 3
12  7
  T0 8  / K 
12   
 T &
 
0 8  

. &H$ : #. )

: R

!!  T0 8  0%. )
1.  $
 1 ' 1!! UML =

1 !! 1  .Collaboration Diagram 1 $


!!  Sequence Diagram
T(! Ra 1 1!! 2  
& 6. ' P ;$ )  1 
  "
.Interaction Diagrams #. )
0 !! 1 ' 1 $
 :

!!
R
0 8  classes 0 )( C>
 T &
 
0 8  
 3 .
R= Class Diagram 0 )( !! .;$ : 0 )( / !

9  T 
3 0 )( !!  
#$ I$ T:3  = .0 $ / (  f
 UML
! K8 Y 3 12  C '   )  
' 9' #$) /  

.C%!
.State Model      (
  = /d  
' )  T 2
.   # #( )
1 
!R!  #R. )
!!   1 4 2 >%>  
' T(
. T "
.  !!  0 )(

76

  
: UML      / UML 

.  H (( 
) I    :44 

1  ,+ H (    :


= %$= ?   .)
 0 8  1 $
&. " 
'   
' :8 3 T "
R= 0
 8 (2 # 3 1 &
" 
 
 .# >  
 ` .$3  6 
1R.  d'  T18  0 !  
1.  d' 0
 8 (2 .# 
' 

.1. 'R 1R R. 1.  d' H2 
 8 (2 .
 V &= 6 "
A  #. &  0
 8 (2) 
 9= 2 6 " 1. 1 d' 1. '
.(6* ) # 
' 
 = &. * 2 1 1

1 " 
: / 
 I = 0 8 

1 
0
 8 (2
. '

 V &=
9
[

77

  
: UML      / UML 

 6 $
'   
' $3  = I
1  12 ;
) /  
' $3  4 " 1 9
? G '' 6. ' 
  
 :3 12 9 $ 
:
 1
12 1

8 (G  1  S1



 1. #`'  

."UML C !
"
?

 8 (2 S2
.
 ' 1. V &) =
T
 V &= 3 ! 


 12 1


.4F 9 = 4H
!

 8 (2 S3

 H" . ' 1
.4F 9 1
.
 8 (G K!$  
 7. #( . ' S4
.1  K'
 
   #'

 8 (2 S5
"!  1 : " H " <   :45 

0  d' 
 = 0  T%&' 1  KY= TC ' # > ! ' 1 U
Object Oriented 18 R 7 (
= '8 0 !  2 / .18  #

4R 12 R 3 " T%>R .R( 6 ( 18  # 0  d' :H Design


7R. # R$= RU  I ( 3 1= T &') 
  

 8 (2
.C%!B

78

  
: UML      / UML 

 : ( 

Collaboration Diagram 1 R$
!!  ( # 
' T'  =

.!!   
' 
 9 
' = < '  .UML =
# R> R = . 6 . 0 8  1 0%. )
d 1 $
!!  f

:#  1 $
!!

 : 
 :46 

(  < :  : [


:
 &. K

 1 $
!! = )(

:
 /

 (18  T< 2 6 $ ) )( instance #>
2 '

79

  
: UML      / UML 
1R R8    T
# > = .)( '
' 12 ) 1 K2  T  2
:#2 "first" K' 12    T ' )(

.!R ;$ : 18  #( &   T c 18  : #( 


 12 18   2 "
. ' "account" 18  : 1  "bet" 18  #(   
# > =

= . a 18  1 6 '  ' # ' "  T s #( 18  


  
1` &= /  T ' "account" 18   ' ?$  1  "bet" 18  T
'
.  K') #$

R 1R'3 1 &H


 T ' : parameters 0 !$ "  2 "
.  &H . 1 ("Money" &' )( T# > =) 0 !$ 0   4 .

80

  
: UML      / UML 

R  R= function call )I * .


' I 
) 4  Y 
12  '  1
R  U (
  " UML 0 )(  = 
( f( .(
AR
 C R!
(R 9R
12 A T   9&
'
0 " T . . G
.H)
return := message (parameter: parameterType):
returnType

?R$ 
R .1$  ' ( = $ 1  "bet" 18  
 T
# > =
:f( . 4  Y  ' 18    T "getBalance"  '

 :  : ( 

R R= .R
( 
' T1 $
!! = loop  
 # "  2 "
R8 $
18 R 
 0 3 ' 8 3 1. 6 . "Race List" )( 1 18  T# >
.K' K :  12 "Race" )( = H. # 1 ! :A  #2 1 .K
8 3

81

  
: UML      / UML 

TR  18  ' 


1   T  

'  ' 12 7 "  %. 


' 2 .0 8  # : 6  $' 2 7 " 6 m (# ) "All" ' 
'
.9)( = 0 8  0 $  :H C ! 1. 0 8  . UML 

1   (   
:  : ( 

&    ! . c 18   '
/#>
create * "  C 18   T  2
:
( * B . 

UML = T0  1 9


(* R"/CR) Create 7'


 ' ?$ * ;$   U ( T
12

!$   18 

  4 H2 .


'  0  I$ =  T)( 7 "  ' ?$  T$ :3  =

12

..constructor J  0 8 B 1

82

  
: UML      / UML 

  +
"1" R  ; U  1H

1a  &H
3 
#8 ' # 12 I%
R$3  4 R" #R2 1R  R' )

 K  

7 "    &  
 ' 3 :=  T(
'  >G I2) #8 ' 1  )H2  . 
'
. 

  8 :  : ( 

.R. 6 (R 0 
/ #$
9 <  &H$ :  ) / # :
.1 $
!!  
' (1  :H) place bet  
' $3   
9R') &.  B 
  
8'G 1 > K 
 T$ %  V # > 
(R 12 R T7 2  T%> .(#()  & = $ #8 ' 8 3 ; $
R= /R (R
#8 ' 6  $ 9' .1 $
0 !! *  
9 # >
.% #()
:RH) Place Bet# R& 
 R$  
' $3  9(  C ' #() :
.(1 
9R' T 'R 0 8  /& 
` 12 1 .0 8  ;$ 
 T!!  * 
0 R8  RI$ 1R / 
 6 0 8  ;$ 4
 `
. 1
 conceptual  )  T ( 1 6   
`
12   
:   I  )    .#()
! = K8  3

83

  
: UML      / UML 

4 9/ 9 4 0 C* :47 

7R. R' T(7. :H) is placed on #> Tassociations !   12


2  
 3 .1 $
!! 7. #8 '  
!  /  
' UG
R2 R .(C ') race  ( ') account 1  '  
(# >) 

#
]  12 #
 1= T )   = K= 
 
  ! 12  ! 1 T1
.!1  $  1  %= T  ? " .1  0 !
 ;$
*   T ) 
. = 2 :   
' :8 3 9( 6. '
.(1  :H) Place Bet # 1 $

.%  .customer 1  2 T actor .% # Y 2  T* # # 3 .1
= KH
 ) 1 K TUML = 1 $
!! =   H * V
.#  2 7. !!

84

  
: UML      / UML 

place bet 
 1   . T 
' $3  9( 7. *   T1a .2

  8 3 7. 


 18  
 " .0 3 ' 8 3 ; . 
 T1  :H
.(C ' 8 3) 13Race List 7. 18  C ' " T1$  0 3 '
)( design class 7'  . )  = &I   18  
.(
03 & "   &I )( &2 2 T(

8 3) Race List)( 1  18  7 "  ' ?$ ' .% T1Y= l" .3

& T1a .(C ' 8 3 ) getRaceList &'  ' T(C '
  #% 1 & 
 . &') :

7
 C ' 8 3 &.  d'
.&8 '2 1. & d'  T(C ') Race 0 8  # 7.

. )  1 /2 


(C ') Race 18 

R R 'R TK  * 2 2 Tarray =)( 2 Tcontainer   1' 

13

.=&
'

85

  
: UML      / UML 

= 1a 6  .1  7 " 1a &



3 0 3 ' 8 3 12 ;
) T $ .4
$3  72 )()  
' $3  0 )(  = *   '  T1  $

.8  1 C ' 
 1a .% =
'  T( & 
 $  
'
7. 1 '
 8 3 7 " 1a 
 ./ 
 
C ' 12 1a ;
= 
1. d' (C ') race 18  #$ 12  3  #2 1  TC '  V)

2 9    
#() = <  9' .K= 1 '
 8  I )

.   #>

C ' 1 !
 ' T/ 
 
 C ' & ' " 
 3 3  ' T "
.C '  = 1 '
 1 8  /

 K$' T< 2 6  .K= 1


 1 '
 9 $ 12 C ' 18  9 .5
.1 '
 8 3 :
 C ' 18  #$' Tloop  
 
' &
1
' ` TfH  .K=
G V   I = A   " )
$) (
. 1 * 1Y=  T  4 1 0    6. 3 = 1 '

1w  ' .0   6. 3 1 # 0%'
4 
'  c * " 1
'
#d'  / 
 
 (C ') Race 18  1` # )
 9' T .
.C '  = 1 '
 8 3 :
1.
86

  
: UML      / UML 

'  '  TK $ = 6  < 2 6  .1  7 " 1a +


1 '
 8 3 .6
1  E  > T  '

 12 1a 1  7. T 
' $3  0 )( 
.K.
 T
 C '
 7 "  ' ?$  T1   C '
 = . 3 1a
.K. :H 3 1  12 &= / 

87

  
: UML      / UML 

R  $) (


: (
 2
  T  1 $
!! *  .
:  U  $ # 
 
#8 ' .! H code 9 
K. 1 12
 T I = 0   # Y 
'  9 1. !! = 8   .1
 # 1`  .  7. &I
12 (1 '
 8 3 #>) 0   /& 9
..% #  ' #$) ?'
1 12 (
1   . (
.  1  1`  <  9'
User  
' &  C$

#( )
K= 2 Y= T1 B 3  

.K$ # ')2 3 3 1 T  / = Interface


C '  1 *  1 '
 2 9 $ 12 (C ') "Race" 18  9 .2
.  

(  7
 2) 0   6.  3%. &  4 1 . A  12 TfH 
/ J ' A  T  / = (
+ 12    1 T< 2 6 
.$  #( )

K$H 
1  2 :

1. d' (C '
) runner 18  1 $   .3
2 (C ' # ) bet handler &'  T< 2 )( C    K.
.
#() = &H

'  `' / (   I) betting system

88

  
: UML      / UML 
 )  7. ''`
1  /   .)( # 0  d'  
 / $= 
.#()
  = K8 Y 3 

 : ( 
 ( M S:
R .6R 0 R!! 
" ) 7.   9' TV  / #% 
:
:
. 1. = 
0   B `' TI
0 8 !! 1H
   K2 T 
$( = $8    !!!   
 : .1
6. 3 #H=2 ! &=
 ' !! 1Y= T$
  H   0 )( 1
#$ 12  (UML = H2 0 !! 3 ) 1 $
!! 7. & !



 T >2 $  
' $3  1 $
f (2 " . 6 ( !' 2 = !!
. I  
' 1 #. )
# #() !! 
Y .K
8

1 . 7. 

 
' $3  # .scenario        .2
#8  T6 . .(0 * >
'  #8  9
  '8 C=
) )
 0 (

. &H
* . G C
'   G A
0'
!! 1 #$  T!! = (
# 8    :8  `!
.code 9 
. $(  $
Tcontroller :8 (   2  $ D classes ( 0 
! .3
2 .( +' T  T#  T 
) driver $

manager T handler

/ 1G    .* 'G / #> : # $


 ')2  "  T#3G 7.
= T%> .object oriented 7 8  V (
1` 
0 )(
' )( C 12  1 1  T(1  :H) Place Bet  
' $3 
1  .  (  98 I # : # $

(1  # )BetHandler
8  1 12 # # $=G 7. 
  A' 2 #$) 7 % 1' 
   T1 $
!! = (1  ) Bet 18  #$)  1 .7
0       d' K!$  TK
'
1 >  H 18  *  7 " &
 " T H2 .+&: ( 0 ! .4
7. 
 %  3 1 T0 8  1 / U : > 1 $
   #$
89

  
: UML      / UML 
 6 ( 0 8   18  7 #. 
  # .actions # $=G
. &= 2  B 0 8  1  U : 1 $

&  T  ) 6 > # .` 

. >2 #()
G  =  ; 9'

B

1 R$
!R! . 
' :8 3 1    # *  2 T#()  =
R! #%R  (
' 
0 )( 7. 0  d' :
7. 1  3 $
.#()

$
R R 
 : T0  d' :
. &
.   
 H ;$ '
(.1  :H) Place Bet # > '  3 .  G  # 
R / R!
  R)  :'
 9 <  9' T
' =
. )( !!

90

  
: UML      / UML 

9= A 3 :13 


 .conceptual model  )  *  3 3  T#()
  =
8 (R  T1   ) 7.    T1   1. #( )
  )
. ) A
1 2 A' 
  . ) A

R= K   T )  !


 T1 $
0 !! *  2 3  1a
 !! T< 2 6 $ .Design Class Diagram   0 

.   8 & code 9 
K. V'd 12
 R> ) 9' #()  = .  
 c .  (
)( !! 
"
. & '  )  #$

 9  T 
' $3 

(      


(1 R ) bet 18 R ?$  T(1  :H) place bet  
' $3   & =
;R)
R &= /  T1    ( ') Account 18  7 "  '
:(
 V '2 1  
 )  .K
3

 8 *2 4 0 C* :48 

:/ !


1 $
(1 *) T )  1

" 4 ,)" :+  :  57 :49 

91

  
: UML      / UML 

( : H ) :1 1

& 1 12  ( ') Account )( 12 <  12 1 T1 $


!! 1
9(R 7 " operation $ / 9H  .(  K$ / 1) debit A'
.)(  1 )'

2H )   , 0 :50 

@

  7
 T(C) create . = HY 1
&  V  I$ 12 I%
.( & " 

0 )( I$ 12 &) 1) !! 7.

( 4 3 H ) :2 1

/R R= .association ! .   



 
#8 ' / 
= H" H2 

! R K 1  Taccount )( 7 " bet )( 1 & ' " 
 ' T 
:# 
' 7 "   1

2H  2 H )  +  !  0 :51 

#R$)   .! . 1 
 % =  '  
&=    &I
T  2
/ ! R 1 &' V2  " ! ' 
 12   /& UML 
8.
.bi-direction P 3 C 7
  8!  / 
  !  1` 1
$ modelers 1 1 >
0 3%$ = 2  ? 1 `! 2   T = . 1   ! &
"
.C #(= =  / 9
' 9' .J' (

& T 
92

  
: UML      / UML 

(     :3 1

R .attributes 0 ' datatype 0   4 


  / = H2 
.float f( U $  '   balance ( 1
 3

(   % H ) :52 

9   :4 1

12 6 R= encapsulation 9R


 8  7 = ' 'G  ) 2
1R / U 1.) K   $ 1.    K (  7
18  & 
0  
.(0 8 
R(  2 public  . 1
0 $  0 ' 1 2 1
6 " :H 12 
R8  R%$ R$ /' ' C ' #% 1 TUML )( !! = private
.((   ' ) 3  %.  ( $  ' )
T6 . .(1    ) f   ' A  1   T(  1
' 0 ' #
0 R$ # 3 1 " 
'
1 
T6. ' 98 I 1
  T . 1
0 $
. &') )( &H

!& -0 
 :53 

9R 
 R
B 0 $ 1 )  1a  T)( !! #
 3  1a
.C #(= = 9 
7 " #
.
 9' .code

93

  
: UML      / UML 

,
Aggregation , &)  7 8  (
= & f% <"
.< 2 0 8  ( 1 K$
) 1 /d  1   18  12 6 =
R3 !  R $ 6R 1 :
 '  T ! '   I = T%>
.  0( 3 !  T 0 '
R(  & . 1$ # :
  
' UML = :
 K

.!

R
$ (    , !  :54 

/R 1 R
 12 fHG 1 1 = T )  = $
( "
.:
  
' T ( 


<32  1
T
2 composition   :
 K  c &)
.* G 1 #   12 ; )
3%$ 12 &) T:
1

94

  
: UML      / UML 
T#  . '  #I' '  1Y= T0( 3 ! 2 " T/%.2 :
# > =
.0 )( 1 1 
 12 # A  TK
)( 1
 1  

:
 T 8
 1 6  / 1$ 12 * >
' T:
&  & K
 !

8$ $ 0   !  :55 

  , 


W R R= R'  VR 1  T) 2 )( !! 7. 0 3%$ /  "
R 0 3%$ / 12 1.  TA  1 $ G 1  UML '  ;$ . (

1
" #> ' K !  &
 1 1
 :
) &
"   T8   &'"
.("1
R`
G R= T18 R 7 = '8  ) 2 :
12  ! T .
. ( / 7 " 6 B C
'

B

.0 R $
R= R. 7. *  T)(  !
) 2 T#()  =
T a   &'  U = 2 (
)(  7 "  )  1 #

.* $ 1 >  ' 12   

95

  
: UML      / UML 

BC 4 ' =:14 

=  3 1. I  T !
 8
0 . 1 %3 $
 9' T'  =
.7 8   (
 *  = &'

0 &
T:R3  = .= $  & 
3 #()  = &

' 
f8 ( ;$
7 R (R
= #  I$ =  '  !' 0   B / A &
 1"
.18 

> 4 
02R .?R 8    # 
'    . #  pattern !
1R 0  &
 $ 12 " T0
 7. @  0 
 = &I = ! G .
1= $e $ 2 K
 T(6 : ) Design Patterns"(
! 2" :  

 #%
.Gang of Four "$ G  (." '
T:( Factory #>) 
#&' ' K (
! # T#( 
. #&'

! R2 1R ) #3G 7. 
 T(3  Observer T1 
. Flywheel
. &  1 12 K') 
 ( # 7.  
/ (

9R'  T"$ G  (." &
3 
(
! 2 1 H$  <  9'
.2 GRASP ! 2 V 
General Responsibility Assignment Software :# (R
  GRASP

7R. `
= . '
  T  d' :
 $  ! G Patterns
.  ! 3` 0 )( 0 ' 1$
3 2
I2 7 " d $ 0 )( 7. 0 = (
 A'  d'  :

: &` 

96

  
: UML      / UML 
&) #&'2
(. '
'") :'
  &' >2  3
 
' 6 .B  3
' 
>2

T $ C '
 High Cohesion TJ Creator T   Expert :7'
! G
/R 1   # <  .
 Controller  T;) 1
3 Low Coupling
:! G

Expert 
 :(GRASP 1)

R R
! G >2 H2  K2 " .  !' ! T &$
 T 
`2 2 1 $
0 !! *  3  .2  2 1 12  !  . & 

.(
0 )( 0 !!
0 R$ AR

)(  d' (
" :
 12 7.    !
" d' /&   %
< R2  T *  2 #>
6  T0 )( ?%>  .!'  # > 7. 6 I 
.SKU* 1  #>
6  T 2  T*  G !' #>

: )  1 ` *  =

Stock Keeping Unit

97

  
: UML      / UML 

4 0 C*  *


Z 57 :56 

12 R /R  
' $3  . 
' :8 3 <B  $
  2 #
 T1a
HR
' )( 2 ./ 
 
 *  G  B  
' 7. ; $

( B _ ') calculate_total() 7' A'


R B R)
:R # $

12  
6 )( 1`     !
R #R 6    )( / 1G &') *  2 )(  *   G
.*   ` C$

* R R2 )(R calcuate_total() :method  & (
 T 
.Purchase Order
!'2 1 !' # 3 = $ *  2 
 T*  2  "  ' T1a
. G 2  !
 ! !' 1 !' # 0 
 <  *  2 $  )$H (
1'
1G T R  !R A R&
 R = T B  '  > T(6 ) 98 I .)
!R' )(   ! !'  "  ' & f' 12  
6 )(
. &')  !
:   & / .subtotal() 7'
T G !' )( c ' ( 


G !' )( 1Y= TA'  7. #( . G !' )
4 

98

  
: UML      / UML 
R= $' price() 7' ( ) T6  /) c  & #% 1 9( )
= $
.9( )(


  % K 4    (  :57 

:
1 $
!! 7 " d 

5  < 0      : (    ( 0 "&8 :58 

99

  
: UML      / UML 

Creator ]  :(GRASP 2)


 1" :
# d' W !  .   ! 
>2 # $
'  J !
"$ )( 6 instances 0 '
/0%>
* " 1. 8' 1 12
:12   B
0R " () )(R 1 0 8  * " 1.  8' 1
12  (2) )(
:
0  1 >2 2  
() 0 8  :

() 0 8  

() 0 8  0 '
:


() 0 8  :  3 1. # $


=   (2) 1Y= 
) K . () 7 " 
' 
&
0   A

(() C 
R )( 2 . *  2 * " 
K2 ;
) T*  2 # > 7 " 6$
 *  2 !'2 * " 1.  8' 1
12

5  $ 
 $ ! 0 $ :59 

/R !=) *  2 )( A  T*  2 !'2  *  2 12  #


. G !'2 * " 1.  8' 1
12  ()(
100

  
: UML      / UML 
:  /& 1 $
!!  =

<  $ 
 5  $ :60 

High Cohesion     :(GRASP 3)


2 = . !
 
>2 )( # 0  8' 1
12 7. `
 & 1
RU 0  d'  # .G  1
 12  )( # T  8  (

1R R( R. )R( # 1


12   8  (
d .!

.methods 0  &
:
)( (

T$( 6 "  I (
. T
# > =

101

  
: UML      / UML 

: 1   9  0 :61 

C%R!" S# R.G 1R R$ 


)( 12 fH  1 T (
 #
*R' (
 . d ; . ?
 $( A 
T# )3" /#
T0 B
.'
 U )( 1G
/R& ; R
) R  fH  1 V T)( /  ( $( 1 1'
.K. )(
6 = != #>
12  )( # 12  0 )( *  . &.
"  
6. 
.:3   . 1   "*" #>
12  )( T< 2 6 $ 6  '8
#R3G 7. )
 '8 =2 ?%>  #  "Lift controller" $( 

1G .R  (
1Y= A  .# !.G #'  $(   2  B V  S
.0 )( 6. 7 " "$( 
" _

102

  
: UML      / UML 

 +  8$   0 ( 0 :$ H 2* : :  0 :62 

Low Coupling S0
 + :(GRASP 4)
7 " d  1
3 .< 2 0 )( 7.  )(  
. < 1
3 V 
0 
7 " d 3 6  )( 7. 
 #$
2  ( 2 
.  $(
. I . 


1
1
3 1  $ 0   T1
3 :3  ( 6
 '  1 $
!!
.0 )( 0 !! #% 1 &
I% H2 1
.1
3 6 0 %. H  K= &I  0 )( !! 1 `  >  =

103

  
: UML      / UML 

( 0 
 H +3 1 :63 

;R$ #`'R 12   I  ( & %$= 63 # = !  # #


:%> .(
 # 6  8'G
  (V ) Outlets )( 6   !
 (#!.) Fault )(  
:H 
 (
6 ) Tank Controller )( .   U !
!  12 f G 1 T#  *   T* G . ' ; UG ! 
.1 $
 . # " 1. P

U )( / 1
3 .!  1   $  & 
6   
.# .G 1   $ 
 incohesive '

 ' ?$ != 
 .1
3 #$ ;)
6
  !   )  4
"
/R& .R ) R   = /

!  " < 2 7 " )( 1

104

  
: UML      / UML 
 ) 12 1  &= d 
  = != 1
3 f' 1` ')2  T !
.$3  6  = !
 H2 
RU < RG )R( 1R  ' ?$ U  ` T1 $
  = T  "
1
3 1  "  # &  d' ')2 #`' . T )  = 1
!

RU ! 1 =  . '
3 1  6 
' . 2 $ :3  = 
. )  *  3 . fH 
 / 4 /0 C* 4  < +3   9H  :  6.  "
$  / - /+3 R  ,H  .  <     7 
! L    B H + 
  8
12 R
R
R3  )  = K2 <  9' .*  2  I )

:( & ( 1  &G) *   2 &$

2/1
 18 
 2 C 1.  8' 1
'  )(   T "*  2 C"  
' $3  =
 1  Customer )( 1Y= Creator Pattern J ! 4
Y 6 * 
: 8' 1
12  

5 $ 5  :+/  :  0 


 :64 

1 R
 R&G T  .;$ 1
 *  2  1  #$ 1a 3 T "
.$) :3  = 7


105

  
: UML      / UML 
RG !R'2 = RH" 7 "  
' $3  

T*  2 C 
   T $
 !'G = H" 1. 8' 1 12  1 .* 
0 R  AR
R&=) #$ & 
1  )( #$ 12  0 B <"
.(   T ! 0  T9 (G   T !'G .  % &

 2 (   @ 2<  < 


 7 (   .$   :65 

#R R
$
& ?%> 0 )( 1a  f (2 . )8  
3 0
2    /
T !R'G * R" 1. d' *  2 $  1 = T< G 7. & 6 
. G !'` & .  18  &= 1   #('
G 6   &
0    12 K T*  2 )( A
 1    
. G !'2 * " 6 G 7 

12 #2 1 * 

106

  
: UML      / UML 

+$ + , -<  $ H ) :66 

R
 )( = T ' G 
 G !' )( *  ; $
" T1a "
0R  (R
R = 6 0 
3 # .*  2 )( 1
' >`

'
 2 X*   2 1
 18  . )   = &. 9 $

0 
3
.  
1  ! 0 
3 1
&  . !'G A

* 
Demeter   +

R  R $= ' 1   T"*  : ?

 ": 6 $ H2 9 $ 
!R=  R 12 R 18  G method  & 2 12 7. 1   .1
3
:# :


0  &
K') 18 
 & #    

0 !$
K 
18  2
.6   6 ( & I)

0  0 8  2
!( +3   S0
 "&
" 8$ (   :

107

  
: UML      / UML 
+3  1
$ 
:
. = 2  = HB  H ;$
*' =  '
 $ ' public  . 1
)( = ' #$
  2
()( $
constants 0 > A  1 7>
') )( # $
'
  .
. get/set methods '
/#(
0  & != =

" "  . 1   & )  $ interface 0 &  1 1  #32 =

(   $ # 3 1 K 
' 7 "   0.
0 !$ 

0   1 #
 I 1  '
0   #$

 I !   !   $ C '
 
S#$ 1
3 1 #
= )

 .#$ 1     
0 )( O)
 9'  1
3 .
 
"! 0 8  " 1 #3 .   I K') 1. $  U
.#( 

Controller I :(GRASP 5)


7R " R$ .K !  '  = K. 9 $
'  G GRASP !
0 R $
*  3 . .(1  :H) Place Bet  
' $3      I
2 T(12 #()  & = 1 $
!! 8 & # : ) /  
' $3 
.K P8
 ; . 
 9  T
' 1 0% # 
' 
 9 
&  2
 8'R 1
R' )( 2 .
' C ' #( )
; $ 
 T# >  TA 
0 !
 /  

R3%. 0  #R( )
0   K` . W
' Expert   ! 
' 
. & $
 #( )
; $    1
12  C ' Race )(= " C '

108

  
: UML      / UML 

2 0 S  6   $    0  4 :67 

)( %$= !   ! A&


 1 T:3  = 1  T  =   G   3
R2 =   1
 12  1 T0 3 ' C$
  # = 6    C '
!'  
' 0 &  #>
  18  2 2 T0   . 3 )  
' 0 &  # 0 $ = H" T .
 T  I = )( 8  V   #
)$H (
$ 
)( #  ( c
0 
" ?   .(   1
  T &= 

   1 2 
&I$
1' =  '  
' &  (   #
' 12    T0 !

./ 
   $ H #$    0 )( # % .
&'')  )  =   0 )( *  I )
 > #H=2 1'
2  
R' &  6 " # & #  T(Business Classes "# .G 0 )("
.K   2 0   6. 3
C ' #( )
; $
12 C ' )( 9 1
I  
1R &$  T6 )( #   .K !  
'    #
 #
.# .G 0 )(  actor .%
< 
R' R$3  R' > +# R :1R R 6 R. /R K )( '

:7'RR # RR  RR
 T RR
 RR= A RR .<UseCaseName>Handler
.1  _:H_#  PlaceBetHandler

109

  
: UML      / UML 
#8 R' R& KR )R( R2 R > T
' 1  G # 
' # 
R
    1 6*  & P' 
6 )(  #  .messages
. &=

 IH )  
  :+ I :68 

 &$
. 
6 0 )( = T 
' &  # 
'  y!   =
.K
0 )(

B

' GRASP ! G C3 C !
.GRASP ! 2 )
' T#()  =
.A' 
2  T 
  3 >2  T H >2 7 8  (
7 " d

110

  
: UML      / UML 

G :15 
R>  R 18  7 &H
 
63  >2  = $  ) 2 <"
) & !

 7
  T>  7. ' '2 6 I ' T#()  = .Inheritance
.>  1.  $
 ULM 
7 " (  I'  T( & !

  7


(  < 8
12  T18  7 = .& 
 8 ( = 0 )( $H A 

 T U
T)( / 1 ? 
 . .6  )( = 
 8 ( / H
9HR 1G 2 1 T)( 1 ? 
 . . & 6 0 )( *  
.  0.  6 0 '  98 I
  .*   % A'  0 '   2 # .A  7. # >  =
: 
)( K. 1
'

   !& * :69 

.< 2 6  
$ 


111

  
: UML      / UML 
KR  # .
 '  1 > & 12 " T1
)( 9%
 U
T HR2 
R 0 ' ;$ . $  ' H2 .14 #  ' A  T'
. )( K 

% 12 " .0    #G :#>


H G 1' T Parrot *  #> T (
6 )( = H"  3 "
TA  1  .< 2 6  *  )( 
 P   0 ' # 9H 1 
.6 )( = 
 (  2 A' # H 
Die TR Sleep T#R2 Eat 0 'R  T . Age (  2 "

TA  .0   # 1 
 1
12 ;
) A'  0 '  1' T0
.1 Animal 7'
6 )( *  :!
'

 8$ " " 0 :70 

1R ?R 
 T* 1 * 1  T"" )( * "   . T1a
.6 )( &
 
P   0 ' != &. 9H  "1 " )(
R R "R" Dog )( = 12 I% .UML (  1  
!!
. &= H 6 &G  0 '  P  1H

7.R
R 2) V R'G )(R base class 7.R
R& 2  )(
)( derived class 7'
&  `2 
0 )( .( e. )( Superclass
.(. = )( Subclass 7.
 2) 


!) 2 % &2 ;


)

112

14

  
: UML      / UML 

" " 0  "!" 0 5  :71 

* RB .V R'G )( V) 1 


 6 0 )( * Y 
' :!
'
:
 ? 

T )(

    B
:72 

0 )R( ( ) 6  # 0 )( 1 ? 


. = 
' :!
'
.class hierarchy

113

  
: UML      / UML 

( 0 4 :73 

S$   
  4 8
7 " d &= .>   
' =    18  7  (
= :8  `!
R2  V 'G )( : > 3%$ !
 
 0 )( = . ( = # 
. & 
 0 )( = 0 
&. P
' V 'G )( = 0 

KR R
R #$ ! H 9 $ 12  T
 )( 
' . T H2
.H   # . ? $  X7.G 0 )(
.proliferation of classes 0 )(  
9 $
 /
. & 
R' KR=    03 = >   
'   
  '2 <"
:
 &.
"   
6. 
.$
 ' != & 
'  > 
R>2 4R 1  
 0 )( 1
. != >  
' T c  $

: & 1$
' 1
. 3 
.V 'G )( 1  (

114

  
: UML      / UML 
1_4_ 6. 3
%100 6. 3

%100 1  +
 " .
 0 )( 7. C !
12  V 'G )( (  0 ) $
#
1R  (
 >2 ' * " 
  T? 
. K2 $ &= T6.  / C !

:A  7. # >  .V 'G )(

0:) 8 :74 

.1 R Animal )( 1 * 1 2  ! fly()  & T73 # =
 R& KR T Person T
 )( 1Y= A  T !
0   # V=
.K !
 K.  U
. ( #  C  ! #&'2  %100 6. 3 # 

115

  
: UML      / UML 

&3
person )R( 1R ! fly .  Y ! '     TC ' # > =

. # 9'  


2    1 H &H = 
6.  / .>    = &
" 1  0  &
.  3 #()
1 #  = I 9' .Substitutability Principle  %B

_%_4 1  +
: 6 R $ .  >    ( <
 !'  ! 1_4_ 6. 3
%>R .7R$ R& 1 12  <V 'G )( > 1 4  <
 )( >
."1    " 2 "1  1 4   "
# R T ! 6.  / &= 1
 V '2 0 )( 1 
 0 )( T U
:. # >  = T 
 >2 1
 (
>  C ! 1. 9)(  
' 6 ." # >
R f'R
/  ! )( .queue  ! )( (9 
)  " ;
)
.  !  2 1  #
  !  & =  = HY

  0 :75 

 R! 1R   4  ! 1  4 *  


 `  3 T6
= $
 ! 
0 $ V) !$  ! 1 4  ._  ! Dequeue 7'
) 1 &
"   !   = H"  Y f'
= H" 0 ' : 1
.   4 1  ! .  !

116

  
: UML      / UML 
#R$  
' 6 ."  T  ! )( = %$= / 2  #$ 1 6 )
'%
.)( / 1 ? 


"   1   0 5  :76 

 "%100" 6. 3  "1_4_" 6. 3 0


 
 ? 
 #
)(R #. C !
Queue  ! V 'G )( = 0  & # # :%100
. ! 0  & / # 1G T$   B Dequeue _  ! 6
TR$ ."  R! 1 4  _  !" 7$ & 
6 $ # : _%_4
.  ! 1   4  _  ! 1G T7$ &  6) 
.valid  (  (  >  "
.R
12 R& R  .Stack  R )( * "   2 # .$ 2  T1a
TRR _= RRH") remove_from_front() add_to_front() :1 RR&
.() _1_ "
dequeue )( 1 &> 
! '  T )( 1   )( 
 1 

.1 & % & 6 G 1G T_  !

117

  
: UML      / UML 

!H ) :    ..   Stack 0 5  :77 

(  ) Stack )( `2  Dequeue  


' .2  ) $ 12 
 T  = H" K    
' 9 
2 .#$ 1    1
.#$
  )(  1= A  T 1 &
"
12 7'  .  9$H (
`
&= . > ) $  12   U
9R _1R_R "  9 _= H" :1  & H2 0>  3   Stack )(
7$ 2 & V 1  & 1  ( remove_from_back() add_to_back() )
1Y= TA  = HB .%100 6. 3
  2 (
   )( 1Y=  !  =
1R 4R %R$= VR  R 1G T _%_4
 2 H2 (   
.C%!B 7. _  ! Dequeue
C R! 1R. KR   
' 9 
2 12 $  (   1 "
KR  1 1   G  U   9 !  )  = H" `!
0  &  " :!
'  2 
 .  )(  '=" 1 T ! 2 
 
.? 
. )( 1
)R( * RY  .>  1  aggregation :
 
' = 1 #
1R 'R _  ! Dequeue 4 1 # &H  T  stack 7'
6
.(  &
'
118

  
: UML      / UML 
remove_from_front()  add_to_front() 1 $ 1  & =
1a 

1 R& 1R  R" .  )( 1 * () _1_ " T _= H")
Dequeue )( &

1  1 & V) !' 0 * .
' 1. 6 . 1'

._  !

 :0 Dequeue 0 


  : 4 Stack 0 :78 

1R$ 1 R& 1R * .


' != & Stack )( 
' T1a
1R R G  .(  $
") " Dequeue )( = H
 0  &
R.  &' >2 1
'  Tcohesive C '
  . &  Stack )( 12 `

. &
 (  &&=

8   
12  >  12 " T 
' 6 ." C
3 6 2 &`  
>  12 U
6R$ 0   7 " d
12 1 >  # $
' =   .  &  


.proliferation of classes 0 )(R > 
9 $
 / . &&= $( 
9( ) ( U  ! >   
' 
 .  >2 1
' 

R. 3 : C !
 K2  T? 
.  (
3 6  H 7. `
  .(/%.2
."1_4_"  "%100"
9R
.S;R 2 C(S =  
' 6 ." >  $
TA  7 " = HB
R= 
T . 6 (  9$H 
 )(  V 'G )( 1 #( )
RG 
'R 2 TR`
 T
 0 )( 2 = >d 12 1 V 'G )(
. $

0 )( '' #. ) = $ 
' )(

119

  
: UML      / UML 
1  $ 9' >  ''
 )( 13 C$ 6 !   )( 
' 1
&$ 4 (
 12 *  1 )(  0 )( / : # $
    4 (
  03 = K =

(   9

  8 :79 

R= 1R(  * HR.G 12 &)


& 1 ./%.2 # = >  6  I%
1Y= A   .Person 
 )( # 3 1 1 I U Animal V 'G )(
. age ' 7 "  ) &  play() work() T talk() 0  &
)(R $
0  & 12 # #  12 :!
' G T   ! 7$ K 
.Animal )( (  0 ' ? $ 1 1

 12  Person

R )(R f'R 1G 
 3  T     1  2 T .
 1 T. 0 ' / #$  T: ! .V 'G )( = 0 ' 6 
. R$ #R  2 9
1G 0 ' ; $  encapsulation 9
! 9'
protected R  I 7'
"6  H 2" 18  7 &)  A 

.visibility
120

  
: UML      / UML 
RG RI #I K T   $  2 (( 7  9'  H$
.  I .
18  7 0  I$ .
 0 )(
:/ 2 1   H$ UML 

   
9  .Person 0  2H @* - _  Age  :80 
.( 0 + 

Polymorphism  
7'R
)R( ` T%> . &=  & *   ! 6 ." & 
 0 )(
1G T   move()  &
12  
P  2 .(# ') "Transport"
.  7. 6  3 1
12   # #8 ' #

Transport 0 :81 

1R &> R' R


 Y= T6 ' Car )(    Boat )( C  2 "
0 'R #  T  &   # 12 ? T# ' Transport )(
:  &

121

  
: UML      / UML 

 %100  _%_4 :    .      1    ! :82 


. 4

 R& * R  R
 3  .)
 C ! 1  

   0 ' T .
7'R  T18 R 7 =    2  .)
  ! & # =  
.# $
2 #
Polymorphism

1  ( 0
 $) /d  A
  T*  2 )
1   & A

 T(
. U
.>  6  = "0
"
R .Transport 7R " move() 7'R  & )H2 ./%.2   6$  T%>
R * R :!
'    .A 

1G 

# #8 ' # 1G T (

 ! A 
 &   # T9 (G 1 $'  3 ! H
# ' 1G T &
.)

R .abstract 6  )( Transport )( 1 #$ 12  K$= :!
' 
.6 U &  2 &= 0  & ;$ A
 12 7$
 R  & *  8.  T# ' )( 1 6 ' )( C
 .
.  )( :   T6 '
9 RG # $
R'     &  6  )( 1.  $
 UML (
:
# =  8 
122

  
: UML      / UML 

Transport 0 H move() C 2 5    :83 

R R U Italics 8  9  .= UML &= 1


 
  <" /
.(3  7. !! ' "  &
 $( ) !! = 
 $( 1

:
 6  0 )( 7. UML = *Stereotype ' # $
' = 1 #

  
  1  0  :84 

6 A
&  *  #
 1 6 4 2 C A f'
TUML 0  ) = H"  '

CR= :H
 1 1'3 1 '  ' ' 1. $ . & $

 `' (  &
C=
6 (6 ( 6 () 2  
' ' (. 1.  $
1 T  . c (. '
The Unified Modeling Language " 6   
' #  :
 1 .' A 

.
 . " User Guide- Booch, Rumbaugh, Jacobson

123

  
: UML      / UML 

  1+
R % 2R  CR !
R. K'R) 8 R3 4RH R
2 #R
$
R= #R$ 12 K :3
  K
  & 2 12 7. 2   
+  .substitutability
.  0 D$ H )$ `  : $ I T$ )(
& R
R=  R R 
 9R 
R! /R fRH 9 
= # >
: H  #I' 2  1 TPseudocode
= HB 9 
;$

public void accelerate (Transport theTransport, int


acceleration)
{
-- some code here >@ A BCD
theTransport.move();
-- some more code G H@ A BCD
}
---accelerate (myVauxhall);
accelerate (myHullFerry);
&3 $  G) H  = :85 

4R 1R R # 


'  .: '
accelerate 7'  & 
 T# >  =
 
R' # ' : '
 12  & & ;
)  T# ' "Transport"
.S# ' $
S move()  &
&G) 6 ' 18  K  12  Taccelerate  &  6   1 ` :!
' T1a
R)I . HR2  3 18   
K
    T(# ' 1 . = )(
   TK 
'
 18  $) 4 &&  ! '  
 
( & ) function
.Transport # ' 4 1 C
 18  

124

  
: UML      / UML 
6 R8  :R #$ K  .    & 
 G != V T6      =
 0 )( : % 
' # $
K  &  1G # T)
 0 )( 1 $' 
1R 
R "6 8 !" 7'
6 )( C 2  3 T  .$ &(

6 8 R! )( # 
'' T  accelerate()  & #I'  TTransport )(
!P  *  6 ." 2 #$
2 1  T#  1 6
f' " .6 )( C
 . method  &  "      '  
R
6R8 ) # :H
 T6 8 ! )( 1 move()  &  " 
 = TA  
!/%.2 & "  2

B

UML = >  
! '

  >  = & 



1 0 )(
G )( $ 0 ' # ?
12  . ) )(
H2 &> 

  0 '  0  &
.9 
 
' 6 ." #2 1 6  6 2 #

125

  
: UML      / UML 


 &H'K H I :16 

& 
7R
 / 3  # T . )( ."6 ( " IG 
. T
  = 1a 7

1R . : T1 ! 4 2 3 # T H
:  7.  &' K !
1 1a
.1 & 

& 6  # 0 

R>2  RH2 0 !
!

 H ;$ = I 9' T#()  =
1R    :'

1G  3  
 
#$ !" 1H UML # . $

0 !
/ #> =  $
1 H
 #2 1 H2 =
12 &

UML H 7 

"UML

7'
  2  = &I
1 UML = Artefacts 0 #

 
;$ (
 ( $ :H &= 
   ' '2   TPackages"
.#
 I = #  2  #>

UML 7 7 :86 

:RH fR G 7R. '  ."GUI" 7'


 * Y 3 T/%.2 # > =
. #  '  
' &  3%$ 0  UML 0

126

  
: UML      / UML 
.
 UML !! = T & = &
3%.  T 1 0 . ; . :!
'
:!' # >  =

UML 7 "&8 :87 

.0  !
three tier "9)( ?%> " 1
3 T/%.2 # > =
."Business"  #  ( $ 7. 
$
"Presentation"  #  ( $
R
!R! 1Y= TA  . #  %$=   &I  !! 12 I%
fR

6. 'R R 0 G 1 $ . . I # . <


' d 
. &

 H . f
)
 6 ( 7.  12 &
'
6   T0   =  

1 A   T< 2  

12 1 
.#
I = 0 ) 0   #>  
T < 2

7 
  :
.R >G  
' T . .UML 0 1 2 :H 1  # 
:R  #$
'  2 .;$ : 3%$ 0  0 )( :

 12  
.;$ : 3%$ 0   
' :8 3
#R ' 1Y= T# >   T6 1
12  ( $ * '2 TUML  # 
" &  K2  & 8 ) 2 . .  1 12    #  )(
" ?  = 6 =  .)
  1 1 (. 1 * 'G =  H

 0 
 7. C 1G .   2 C ) T 
7. 1%$ 1 =  1 
. C ' 1H 1
* 'G 0   ? 1 * 'G  H
. C )

127

  
: UML      / UML 

>7 * 
:   $ 

' " T1' .
')2 P.  
&
  #&' . = I2 = 6   IG :

 
7. 0 
!
W '
1R RH  0 &  $H  (  !  # (
3 " T H2
6 R." 1R R (
C
( =  1' T(  3  #  ) 
12 7R$  2) $( 2 1  6 . 0 )(  
' 6 ." .9 
 
'
12 1R R (   T( & $
' 6 $ $( 1 1
0 )(
R T%> . 
' 6 .B # 3 A' 
  ( component 1 7 " #

.)
 :  = & 
' 1 0 '

7 H ( H  3 S:
&R'  #  0 )( '

!! 
' " :!  = ;
)
. (  &) .

>   7 4 :88 

128

  
: UML      / UML 
( d'R :R
! 2) GRASP 1. K= >
 #() 1 0 = 
' 6.
:
7.  
C !
12 1

Expert 

" :

1 )( # H  1 12    )( & :

12   2


.. K= (
!! 12 f G 7$= H  G 1 
High Cohesion

 :  3

 R&&= $(R 1 1' " ) #$ 1 > 


 12  7. 
.( & 
' 6 ." $( `

Loose Coupling +3 =:)


# R> /%R.2 !! .<
' 72 =  1 0  
. 7. I=  
. . #( 
!! 1  >    !:  #   TfH


7  (3 3  :


.0 )( 1 . 7. 
6  # T1
  12 ;
=

UML 7 H 2*  H  9 :89 

129

  
: UML      / UML 
"1 R. )  RI " R = 0 )( 12 d  T 
. &'2 #% 1
."2 . )  I "  = 0 )( ! 

9 
) 
# #> 8 <  3 T1
 #    I  C.2  ) "
:(fH
;  ' 1 0 $  0 '

 9    8 , 


 . H  9  ( 0 :90 

)( 2 6   & "1 . )  I "  1 )( 2 ?    T  

 (
 # ."2 . )  I "  1
 2 # )  . =  I & 
'  1 . )  I   "  2   
 R
> '  
' &  & 
'   8 = !  
' &   Y
.(3

#R 12 1R `


. 1' . 
 >`
&) #$ 1 >  !
'
T6R 7H= .  I = )( 1 &   #
'
  I = )(

130

  
: UML      / UML 

. ' Facade &  7' (
!  TI 1' .3 G /$
#.
.H$ / # =

2 
.1. R) 1 I 1 !'  $
< 2 )( 9I 12  1'G #
TR$ R&
&  . T
'  TFaade &  7. 0 )( 1 4 
.. )  I &. 
$ 0  & # 1 .

 2 :91 

1 0 * .
' # K

 # T. )  I  . 

1 0 * .
' T1a
1' !  
1Y= T  . =  I 
 1  Y= .&  #%
.&  ?

:)(R 6 R
$ 0 R I R  = .&) & 
 . & =  

  7'
  1 $ $ =  
T  $  T((
!R= TR. )( 1   )( (

Y= .Package Protection
9R
1 <32 <
' $  . & "  ) &  V) $
0 )(

131

  
: UML      / UML 
KR . =  I   C = # T&   .    0 )( # #$
. a C ) 1.  %
' #$ %$=

  D : 7


8R
  R$ R
 R&) 7. 6 d
#  1 6 $
1G KR !R! 3  I 12 T ' '2 $
 .Architecture-centric development
.4  8
1 6      . ) IG 1 . 1
(
1 T# 
&' 6 ( . ) IG 1 . * " #% 1
 T. =  I <(
 C = # T( 2 4 2 3 1 !=  ) 6 ( !
C =
. a 1. #
' # T 
7. 1$ 1 B 
! R R R2 1 R
.#R$) 1 > #&'2 # 1`  = 12 fH 
9R

 .(   1 3) 03 #  0  $ C = 1$

 T $
*R #R  (    1 
 9'  $  6 Y C ) 
. $ K
(  7.G / 
' =  I C$

7 
' TA  = HB .
!! K. $  C )  7 
' T< 2 6 $
!
: K2 TfH  .. ) IG 1 (Facades) 0 &   3  $ C =
R 0 
/ 1 T0 &  =  ."  0 
A  1' T4 
7R. 1R$ 1 1 ! # 3 1 V  T  $ C = # 3 1 d 2
.. ) IG
R 1R' T7.G / 
' =  I 
> d 7. I=  $ C =   
.. ) IG 1 0 &  7. 2 !

0 
>`
&) 'G

132

  
: UML      / UML 

 8
#% 1  I $  2 !!
:H 0  $ C =  3 T
 6 3  I
!R!  R
Y  = . I  = 12  
98 I '8 0  

:


7 UML 
 
  0 9a   
:92 

:R'
 ! 
R' R 9R' 0  $ C = 8 & V $ 12 I%
 I #   $
 A 
  T 4  0 !
: $ 0  )
.. =
E U . =  I #  ( 7
 . ) I 9(
7. C )  '
.6 B #&'  $

K
 $ 
 . =  I # .. =  I #  
' :8 3 *  '  1' .
:
  1 7 G #  = $=   
TK') 8 3  I K` 

133

  
: UML      / UML 

D7  
 3 , + * :93 


) 
 3 , +  :
8   
' :8 3 12     !
1 4  C=
< 2 

= &
8
$( 6 (  6   1
3 #()
! = 



6 R R$
  =  ' ) 
2 1 #! 3 12  # . 
"0 (B " 1 '' 7 "  
' $3  8
= # 1 TA  1  .(< 2
. &
 $ #&'
$ T T/%.2   0  ! C%!" "Fire Torpedoes"  
' $3  T%>
R$3  R8

R A R . $( H  
' $3  
&2 T#()
!
:
 T() 0 (" 7 " /  
'
) * !U f
) W ' 1 ("
V
! H W ' 2 ("
W%' C%!Y W ' 3 ("
134

  
: UML      / UML 
1" .  
=  m  3 T&) &' 1
6 (" # 12 1 H  9&
. & 
' 0 
>%> A&
'
9' 0  ! C%!"  
' $3 

5  

 . =  I # 1 T7 G #() = K)( 
 *  ! = #$ 
'
3 &H$ 1. 
'  T 
7. #

T() C = # 3 1 T  
T/ !

.1 B
R
 
 ? T# 
 P 0
   # 
 T 
#  & =
.. ) IG . 0 & 

B

KR2 fRH  . 6   I 8
!

 H ;$ #()  C !

#R$ R!" # 1Y= TV 3 2 7. C !


 &(

UML  12 1 U
. !' %. 1 12 1 $ 2 H :  7 "  
 

:
  W

#  ''d
7 G #   . ) IG 

1 B     % 3 $
#$
0 &  A
 1  
7. 

0  $   C = 1$

R R TH A 
* 
  ! = UML K



.0  $ C = /
 12 

135

  
: UML      / UML 

-
7%' :17 
  7 " 1a $' T I  $  >  7 " &=  I 
' 2 12 $
.state    = I  *  ! 1 (

f'  .18  &= 1 

 0    f

  0 !!
.? G / >`
H2  T18  & ; $
 12 1 
& ? G ( 
1HR

A
 0  !
/ <32  1 T0  !
1 $   /&
. I #  :
12 & 1  & W'   6  ? G 12
R  0 R!! : UML 1.  . 6  4 #(=) 
  0  =    # >

 )( 1 $ f(  T9'g > ?


$H 1. ?
 (40S39 )(
!0 ' V  0  A&
' #'
 U 6 
=
.8!  ? G 1 4  43 :
 $  
   0 !!

136

  
: UML      / UML 

     8

= 4 b     8 :94 

.H  !! 0 ' '2 1 T#3 $ !! &  ( = I 9'
!R! ; $ A  T 9
&  & &.3 1 
? G :

 ; $
.9
& &. 1 12 1 
0 
2 T(. 'R 0R$= ") ! 7. 1' K2 " 9
& T I
   1 T%>
.(  # 
' ")  ('

137

  
: UML      / UML 

  
 ?

   8   


 ? :95 

* R
  18  1' .  !!  E( I$ ; $ /%.2 !!
* R&" R  & 0 8  I$ .K ! . 18    9(
T(8
 6 8  )
.18   :3  ? 9(
T(bullseye " > 1.")
R T/%R.2 # > = .K  7. 18  
#
  =  '

? G ;$
? 1 ."#'   " K   = != "
" ? # 
' K e-mail 
 
2 = K.3 1  "
" ? 12 1 
6) ( / .K
 
=  ' 
.< G 0  1

138

  
: UML      / UML 

0 (3 

  D)H C* :96 

9(R) R 
f( /%.2 # .0  #  0  9( G !
 T  2
? R2 :
'8 # .6  C2 U K T(8H   6 " 18  0 
=  '


 ? G 1 . /  03 2 = switch off *H * )!"
(  7H)
R  R= 1R
3   6 " .  = "superstate" .   

'' = 1
12 1 T6* H"   = 1
. ."Of" * )!"   2 "On" 6* H"
f'R
C 'R  = UML ."* H" 2 "* )(" T"* " : . ) 0  1
:0  "nesting" 0  H
 

139

  
: UML      / UML 

0 (3  
   $   C* :97 

R&2 7 "  2 "red"   7 " K ( &' T/%.2 !! = K2 I%
G 7. K! H 
' *H 1Y= T"on" 6* H"   * 
. H
=  
."Red"

C
/
" $

1
.  2
. &.3 ! # $=2 2 ( ) 1 1  2
:A  f'

  ?  4  +    C  - 4 :98 

140

  
: UML      / UML 

C
   ? =+   H 
 ,  ? $  - 4 :99 

 M " $
1R$ * R" 1` I% :H 7 " 
 . ) 1 /%.2 
=1

  1  " .collaboration 0  $
 0 8  6 )  !  ./2 !
6  R )  R
1
 
' 
 T c 18  & ' "   ' 12 1H

#

:(  2 # : 
(0 !$)  &.18  ^
^object.method (parameters)

    28: !   $      :100 

141

  
: UML      / UML 

(  H
C
.1$ !   
"   #
1 B V K2 7. d 12 
  2
:
 1$  1'3 1 !  :H A 

!    * 3  3 ( 4 ,) ) "Placed"     - 4 :101 


c  (3 
R$ R  ; R
. 
" K2 1
1 T. ) 0  7 " 6$ T 2
.I) 7
&. 0  
  1Y= T $   9 8
' . KY= T   !
7R " #R
   ."pending" 93
  = 2 8  C
.
# > `
.. = 0  6. = 1 12 1 C
TC
f
= 
"Being Actioned"  
C
C$

 $  #% .H $  
 12 1   2 = T .
#R 3 &= 1  
  1 C
9 8
'  T$  1 * &
 #  .
3d
.$ 
:
 A   f' (6 8  = "H" 9 ) History O
 !' 

142

  
: UML      / UML 

c    :102 

  ( 
 R
$ ( 
 
T:R3  )= T18    :

 0 !! / 1 fH  ;  12 1 U
:8 3  2 .0  7. V'd  I = (. G   0 !!  
' 1
7R
 .(K'R) 
' #' " " &= * 1   
' $3  T%>)  
'
R) R  12 fH  0  '  
' &
 1  I #   
.H :  = "  $ C ="

B

: 2 .  #
0 !! =  I T#()  =
!! (
. ) 0  
' 9
   # # $=2
0 . =  # ' B ? 2
O
0 
. )
0 . U !

& T  !' 0  '


:8 R3 :*R 2 7R. & 
R' 1 B 1 T0 8  7. &
 
' I$
..O " T I #  T 
'
143

  
: UML      / UML 

M :18 


1R # R
 R$ !

 H ;$ 1. 
' (
 *  =
 java =  TA  >G ; $ =   
''  .(code) 9 
7 " 
.7 8  >  2 7. & !
 &' 1   !'

Synchronising Artifacts *(3?  (7) " 


R  ! 7.  I )
  9 
 (
= '8 #8 ' <"
.9 
1 K>  : 1 

1
 (
*  
 ? .9 
1. (
#(= 7 " #
0 .  ;$
. (
A
1  c #
.   9 
1  T1 3 ` 

#Rd
 * ;$   (
  7. *  B 
 T0 .  ;$ =
.9 
  7 " 8 & (
0 3 ;$
<(R
 9 . 1. > 2 %3 9 
9   U T1

 =
 /&
R .0     
# < 2   = H" T # <"
R= 9R 
R
 #%  


(
0 3 V$
  #$


.C ' 

R. # 3 1 & 
' 2 T &$
2 T &
" 
 
$ 8  :artifact   *
1
3   . $ &'  3  H . 1
 T6 &=  d'  ' T !

. $!3 2 T> 2  = (. 2 

144

  
: UML      / UML 

7 H  C* H H )  :103 

 = H 1 1 .6   0 


:
 T = T#&' # V K2 TfH 
1R R
#R R$
12  !  T &
 = 6 (3 0 
0   ! #
!! ' 6
) #! K " 7$'    T & = 1 .K. 6 !'
R'" * `R f'R
('  6. ' 0  ') CASE 0 2 ;$
=   . = . ' 3  .9 
1 (
  
2 "'.
R #% 1 #$ C! > T9 
1   
6 .Y  T1 
 &
'& 
12 T#  1 . ($  ) 2 
#2 1  
.0 .  # ' 
 3 &Y=  T$ 
 0' '$

=    


Design Class (
)( !! 1 
`
9' 9 
= )( 0 ) $

1 R
R$
0 R
R!! 1R
R R
R&I$ 
`R
R
method P&R
R 0 R
R) $
.Diagram
 
' $3  0 )(
1 < 2 0 . ' 
`
 TCollaboration Diagrams
State R  0 '  (#8  /0 * >
' 0 =
(( T= HB #( )
)

.(* !G 43 !  0  :

#2 1) Charts


:9 
K.   12 1 9 T)( # >  
145

  
: UML      / UML 

2 )< 8 , -  0 :104 

:(6   #
$ ) 
 1 3 P
 9 

public class OrderLine
{
private int quantity;
public OrderLine(int qty, SKU product)
{
// constructor TU>
}
public double subtotal()
{
// method definition V->W@ X1CY
}
}
  =  8 :105 

P&R # R" R
.constructor J = H" 
T/%.2 9 
= K2 I%
R R T( G /  . = .    0 (2 =) )( !! 1 create()
.9 
= &
= H"

146

  
: UML      / UML 

     $  , :106 


*

R$  R' 2 6 B / = H"   T 6 " 7.  ! !' 



:9 
 reference attribute
public class OrderLine
{
public OrderLine(int qty, SKU product);
public float subtotal();
private int quantity;
private SKU SKUOrdered;
}
(G) S? L2   ) :  H ) :107 

R # R> .< 2 )( 0 B 1 8  I )


% )( 0
   
 T !'G 8 3 "A
" *  2 . G !'2  *   2 1 3%$  &
:
UML !! =

#> 8 
. V T 2   18  7 " 
'  reference attribute $ '

'R 1R
6 R. T(R
)( !! = .A  7 "   TNumber 3 2 TString 
(
 ) . ( &.    H = $ $ 

147

  
: UML      / UML 

<  Z  + D 5  $ :108 

#R TR
 8  1
12  # T%>) $ 0 !
 7. & $) )

 R
9 
T!' =)( 
 2 ;
= 1 T(  T& * G . '
: =  1'
public class PurchaseOrder
{
public float total();
private date datePlaced;
private int customerID;
private Vector OrderLineList;
}
( M   + H ) :109 

2 R=  1R   1R .constructor J & 1 1' 8  &

'  T & 


6 ." 1 array =)( ! '  Vector :4 T++'
.! =)(  
' ) 3 T0 !


Methods L4   
.method  & 2 P& 0 ) $
G (  1 $
!!
:R  P&  .*  G "get total"  B 2 P& 9( 
# >
: G  !'2 =   B )

148

  
: UML      / UML 

 M *
$ "Get total"  : :110 

1 1

:*  2 )( = "getTotal()" 7' P& 


public double getTotal()
{
}
Purchase Order 5

$ 0 H L2 =: :111 

2 1

: !' # * (Y 


1a *  2 )( 12 7 "  1 $
!!
public double getTotal()
{
double total;
for (int x=0; x<orderLineList.size();x++)
{
// extract the OrderLine from the list
theLine = (OrderLine)orderLineList.get(x);
total += theLine.getSubtotal();
}
return total;
}
.a :  5  $  $  5 K - M   = :112 

149

  
: UML      / UML 

3 1

./)
 A  . G !' )( = "getSubtotal()" 7' P& * .
' 3
public double getSubtotal()
{
return quantity * SKUOrdered.getPrice();
}
getSubtotal() *0 :113 

4 1

 R
 HR2 R .SKU  )( = "getPrice()" 7' P& * .
' 3
.private (( ' 3 :
 !' & 1'  T)

= 7 


9 1 T I $ = ' '2   $ packages  *  12 C ' = 2
.9 
7 " &



H  ?
# T:3  = .6    ! packages  .
&Y= T =   

0 "
R2 = =   12  )( 9 $
= !' #2 . :

=  = )(
8   = )( :H 
' T  # 

") )( / :H 
 
.(). "default"
R
'R
1YR= T"Stock" 7.
 = :H
' SKU )( 0  Y=
:( 1
' )(
package com.mycompany.stock;
class SKU
{ ...
7 H ( 0 ,) :114 

150

  
: UML      / UML 
CR= visibility R I 1R Rc <
'R = HY =  
T  1 #H=2
.(  . T(() protected public Tprivate :! 0  I
1R ?R . package protectionR   9 $  1H
=  

: ! R  R VR) R= 


0 )( != 6 I 1

)( 9 $

encapsulation 9R
6 ) 
 . =  .)( # #  
P 

0 R&  R.) R&


R
R != 8  0 )( # #$ . # 
.
'  ! . ) I !
%$= 1 &  T (facades

R &R
. R  7. )$H =  =    syntax ( T9'g
Tprivate :)( 0 ) $
1 2 & ' 12 1 )( declare f (
! '
.114 # #>  
S protected public

++ ?
* R'G 0 3 ! &) = H" 
2 1 T++' = 
   .  
T () ! 0 '
= 0 )( :H f''  . 7 " namespaces
0 R3 ! 1R 1R> * R" A  ) * 'G 0 3 ! 1 * 'G ; $
 )

.(SKU 7'
)( 7.  & # TOrders  Stock #> T* 'G
0 R I .   2 =  I *' 1 T
 . ;$ !$ 
= $ 0 )( #  ) & * 'G 0 3 ! 2 = )( = .visibilities
.< 2 * '2 0 3 !

UML H (  C*


" (R " R  components 0 R R!  ; R.   = 

.(
!! = &. $ ! 6 ( # ) 0  

151

  
: UML      / UML 
 12 K Y 12 " T! 
!! #. V'd  6 .  12 U
 R
!! T%> .(
  = & 1
  #
    ( .
.8 &   0   .
 T!   > ; $

  1     1 :115 

RH . TR
!R! #.  ! V) #$  .  !' 0  
2 1 3 1 2 T9

 6  / = . & = 0  
.  ( $
9R Tobject = 9 TDLL  
 9 T)
9)    
.(1  9 2 2 T (

B

7R "  R #R
'8 0 $ 9( 6 (
 6 ( 
#()  =
:R  R
 !R 7.  7. *  B  7.  Y = $
. 9 

. / # 1
= =  I T9 

 0     ( $ !  :H 7. . '
9  .0   2
. &= 0  
.

152

  
: UML      / UML 

47
5
[1] : Krutchten, Philippe. 2000 The Rational Unified Process An
Introduction Second Edition Addison-Wesley
 > $ !  #  1 6 $
.UML  &
3%. T#  1 6 $ 6 (
 

[2] : Larman, Craig. 1998 Applying UML and Patterns An Introduction


to Object Oriented Analysis and Design Prentice Hall
7 8  (
 #
 # ! G  UML C !

R& V R'` 


R'2 .0   $3  !
0 . = & !
 TUML # 
 #
.


[3] : Schmuller, Joseph. 1999 Teach Yourself UML in 24 Hours Sams


. ' 24 = UML A') .
CR !
) ; $  >  TUML E( 7.   #G 9( TUML #   
(GRAPPLE 7'
 6 $ K 
.  
' ) UML

[4] : Collins, Tony. 1998 Crash: Learning from the Worlds Worst
Computer Disasters Simon&Schuster
 $ = '  ?  2'2 1 $
: &
0  *   !
:  1 $ #=  ' 9
'
'  0  1 $
 3

[5] : Kruchten, Phillipe 2000 From Waterfall to Iterative Lifecycle - a


tough transition for project managers Rational Software Whitepaper
www.rational.com
:  *  $( # 
  
7 " =

 6  1
 
:  = :  *  K 
' 
#8 ' (3  
 9(

[6] : Gamma, E., Helm, R., Johnson, R., Vlissides, J. 1995 Design
Patterns : Elements of Reusable Object Oriented Software AddisonWesley

153

  
: UML      / UML 
7 8  0  =  
' 6 ."  3 ( . :(
! 2
(
! 2 9
 1. "$ G  (." 1  V &)

[7] : Riel, Arthur 1996 Object Oriented Design Heuristics AddisonWesley


7 8  (
0 = 
'
18  7 1(   0   "

[8] : UML Distilled


Martin Fowler's pragmatic approach to applying UML on real software
developments
UML (

0   $3  8
0 . 7. UML C !
.  

[9] : Kulak, D., Guiney, E. 2000 Use Cases : Requirements in Context


Addison-Wesley
&3 ' = 0 !
 : 
' :8 3
. 
' :8 3 6  T0 !
 '& $
  $

154