You are on page 1of 176

Rational Rose 2000 UML

Visual Modeling with


Rational Rose 2000
and UML
Terry Quatrani

An imprint of Addison Wesley Longman, Inc.


Reading, Massachusetts Harlow, England Menlo Park, California
Berkeley, California Don Mills, Ontario Sydney
Bonn Amsterdam Tokyo Mexico City

Rational Rose 2000


UML

004.434:004.94
32.973.26018.2
32

32

.
Rational Rose 2000 UML. : . . .:
. 176 .: . ( ).
ISBN 5940741312

Rational Rose Rational Unified
Process.
, 
, ,
, .
, ,
, 
, 
.
(Rational Unified Process, RUP)
(Rational Rose), ,
Rational.
,
, 
,
.

Translation copyright by DMK Press


(Visual Modeling with Rational Rose and UML, Second Edition by Terry Quatrani,
Copyright , All Rights Reserved)
, : ADDISON
WESLEY LONGMAN, Pearson Education Inc.
.

.
, , . ,
,
. 
, .

ISBN 0201699613 (.)

Copyright by AddisonWesley

ISBN 5940741312 (.)

, .


............................................................................................... 9
.................................................................................................... 11
1. ............................. 15
....................................................................................
..............................................................................................
UML ..............................................................................................
..........................................................................................
...............................
Rational Unified Process .........................................................
Rational Rose ....................................................................................
......................................................................................................

15
16
16
18
18
19
21
21

2. ........................................................................ 23
............................................................
ESU .........................................................
..............................................................
.....................................................
......................................................................................................

23
24
24
24
25

3. ......................................................... 26
...................................................................................
.......................................................................................................
................................................................
.....................................
....................................................................................
...............................................................................................
................................................................
..............................
..................................................................
..................................................................
............................................................................
...........................................................................
.................................................................................
................................................................................................
................................................................................................
....................................................................................
...............................................................................
...................................................................................................
................................................................
......................................................................................................

26
26
27
27
28
28
29
29
30
31
33
35
38
39
39
40
42
43
44
45

4. .......................................................................... 47
........................................................................................ 47
, ............................................... 47
.......................................................................................... 47

Rational Rose 2000 UML


.................................................................................
................................................................................
: .....................................................................................
....................................................................................
................................................................................
........................................................................
.......................................................................................................
.......................................
.........................................................................
: ........................................................................
.....................................................................
....................................................................................
...................................................................................
......................................................................................................

49
49
50
50
51
52
52
54
54
54
54
54
55
57

5. ................................ 59
...........................................................................
...................................................................
................................................
.................
............................
......................................................................
.........................................................

...................................................................................
......................................................................................................

59
61
62
65
65
66
67
67
69

6. ..................................................... 70
........................................................................
........................................................................
.........................................................................
.........................................................................
.............................................................................
.....................................................................................
................................................................................
..............................................................................
.......................................................................................
.......................................
.......................................................................
...............
......................................................................................................

70
70
71
72
73
73
75
76
77
77
78
78
79

7. ................................. 80
......................................................
....................................................................................
.....................................................................
..............................................................
...................................................................................

80
80
82
83
84

....................................................................
..........................................................
...............................................................................
......................................................................................................

85
85
87
88

8. ........................................................ 90
............................................................................................
................................................................................................
..........................................................................................
................................................................................
...............................................
.........................................................................
......................................................................................................

90
90
91
92
95
95
96

9. .................................................. 97
................................................ 97
.................................................................................................. 98
................................................................... 99
.................................................................................... 100
.............................................................................. 102
.............................................................................. 103
.................................................................................................... 105

10. ............................................................... 106


..................................................................
..............................................................................
.................................................................................
................................................................................
.............................................................................
................................................................................
............................................................................
..........................................................................
....................................................................................................

106
106
107
107
108
108
108
109
109

11. ..................... 110


....................................................................... 110
................................................................... 110
4 + 1 ............................................................. 111
....................................................................... 111
...................... 112
...................................................................... 113
..................................................................... 115
.................. 115
........................................................................ 117
........................................................... 118
.................. 118
..................................................................... 119
.................................................................................................... 120

Rational Rose 2000 UML

12. ...................................................................... 121


.................................................................. 121
...................... 122
..................................... 122

........................................................... 123

...........................................
........................................................................
.....................................................................
.....................................................................................
..........................................................................................
.............................................................................................
............................................................
...............

.....................................................................................

..................................................................
.....................
........................................
...............................
.............................

123
124
125
125
126
126
127
128
128
128
128
128
129
129
130
132
132
133

....................................................
................................................................
............................................................
, ........................

.................................................................................... 133
.................................................................................................... 133

.
C++ ..................................................................... 135
........................................................................................ 135
C++ .... 141

B.
Visual C++ Visual Basic .............................. 149
........................................................................................ 149
.................................................................... 154

C. Visual Basic .................... 156


ActiveX ............................................ 156
ActiveX .......................................... 161

................................................................................................ 168
......................................................................... 171

, ,
, .
(Alex Baran),
. ,
.


, . ,
:
, .
: 
, 

, . ,
, Visual Basic (
, ), C++
Java , 
. 
, Web,
.
(Terry Quatrani) , , 
, 
.
, ,
. 
,
. , ,

, ,
( ).

(UML), ,
Rational Software. , UML
, , 
, Rational Rose, Rational Suites, Rational Unified Process.

10

Rational Rose 2000 UML

,

.
Rational Rose UML 
. .
, Rational UML.

. ,
,
, , ,

. . ,
.



, , 
, , .
! (,
, ).
, ,
, . , 
, .
( ) ( ). 
.

. , , .
,  : , 
.  :
, .
.
, 
, , , . ,
. UML (
,
).
Rational Unified Process ( ).
C++. ,
, , 
.



UML. 
.
.

.
.
, 

12

Rational Rose 2000 UML

, 
. ,
, .

, UML 
Rational Software Corporation. : 2800
San Tomas Expressway, Santa Clara, CA 95051; : 81018007673237; 
: product_info@rational.com; : www.rational.com.


, 
.
Rational Rose 2000. 5 11. 5

.
Rational Unified Process. 11 
,
.
, 
Rational Rose Visual Basic Visual C++.
1
, UML .
2
, .
3
.
4
.
UML.
5
, , 
.

.
6
. 
.
7 
.
8
.
9 

.

13

10
, 
.
11
.
,
, ,
. ,
.
12
. UML , 
. 
,
, .
A C++ 

Rational Rose 2000 C++.
B Visual C++
Visual Basic
Rational
Rose 2000 Visual C++ Visual Basic.
C Visual Basic 
Visual Basic.
, .

,
.
(Steve Bailey), 
(Naveena Bereny), (Kurt Bitter), (Grady Booch),
(Jim Conallen), (Ed Delio), (Lisa Dornell),
(Matt Drahzal), (Maria Ericsson),
(Jim Ford), (Adam Frankl), (Scott Frohman), 
(Jim Gillespie), (Dorothy Green), (Jon
Hopkins), (Ivar Jacobson), (Jason James),
(Philippe Kruchten), (Eric Lipanovich), 
(Peter Luckey), (Greg Meyers), (Sue Mickle),
(Laura Mullins), (Larry OBrien),
(Sylvia Pacheco), (Jim Pietrocarlo), (Hugo
Sanchez), (Charlie Snyder), (Lynne Steele),
(Walker Royce), (Jim Rumbaugh), (Tom Schultz), 
(John Smith) (Dave Tropeano). 
(Carter Shanklin)
(Kristin Erickson) .

Rational Rose 2000 UML

14

, , , , , 
, (Courier);
, , 
, ;
, ;

, : New Actor.

,
.
,
. 
(, number_of_students).
,
(, numberOfStudents). , 
.

, , 
, , : .

1.

(visual modeling)
.
,
: , , , , ,
. 
,
.
(model) ,
, 
. ,
. , , 
,
, .
. 
,
(notation). , 
,
.
,
. .
.
, . 
, . 
. 
. Visual Basic,
. 

.
, ,
.
.


(triangle for success),
. 1.1, , .

16


, .
, ,
( ), , 
, . 
, 

( ), , ,
. ,

(), 
. 1.1.
.



. :

,
;
, 
;
, 
, 1.

(Unified Modeling Language UML)


,
. (, ,
, , ) .
( ) .

UML
90 
. OMT ( ), Booch (
) OOSE ( ). . 
OMT
, Booch 1991, , 
, . OOSE 
,
.
,
,
. , ,
1

Booch, Grady. Object Solutions. Redwood City, CA: AddisonWesley, 1995.

UML

17

OMT2, .
, 
. , 
OMT
. , , ,
, , ?
, .
, UML. UML
, 
. , 
OMT, , 
(. 1.2). , UML 
 1.
UML
,
. (0.8) 1995 .
,
(0.9 0.91
1996 ). 1.0
Object Management Group (OMG) 1997 . 
1.1, ,
UML OMG 
.

( 
)

()

UML

(
)


(
)

(, ,
)

()


()

( ,
)

. 1.2. UML

The Unified Method, Draft Edition (0.8). Rational Software Corporation, October, 1995.

18



, 
.
.
. 
 ,
, , , 
. ,
. ,
, , 1. 

.



(. . 1.3) 
,
. 
: , , , 
, , . ,
. 
.
. 

. 1.3.

Booch, Grady. Object Solutions. Redwood City, CA: AddisonWesley, 1995.

Rational Unified Process

19

.
, , .
,
.
.
1.

Rational Unified Process



Rational Unified Process,

,
.
Rational Unified Process :

( );
( 
).


.
:

(inception) ;
(elaboration) ,
;
(construction) 
;
(transition) (
, , ).

 (business modeling)
;
(requirements)

;
(analysis) (design) 
;
(implementation) 
;

1

A Rational Development Process by Philippe Kruchten,
CossTalk, 9(7), July 1996, p.p. 1116. Rational :
http://www.rational.com.

20

(test) ;
(deployment)
.


(. . 1.4.).
. ,
,
, 
, , .
.

. 1.4.

. 
.
, .
. 
, .

. : 
, , ,
, . ,
. ,
.
Rational Unified Process, 
UML 
.
. 
,
.

Rational Rose

21

Rational Rose

.
 , 
. 
, 
.
Rational Rose. 
.
Rational Rose 

 /
, . Rational
Rose 
, , 
. Rational
Rose Rational Software Corporation 
: www.rational.com.
Rational
Rose, Microsoft Visual
Modeler.
:


;
;
;
Visual Basic ;

;
.

Rational Rose Microsoft Visual Modeler 


 
, 
, 
.


. 
, : ,
, , , , .
, 
.

22

, 
. (UML) 
,
.

,
. 
. 

. 
, 
.
: , 
, , , , .

Rational Unified Process, 


, .
Rational Unified Process.
Rational Rose 

 /
, .

2.

.
. , 
: ?. 
, .

,
. , 
.
.
. 
: .
, . 
, ,
,
(proof of concept prototypes).
( ,
, , , ,
). , , 
, , 

.

, , 
, ,
. 
,
, , , 
, .

. 
, ,

.

.

24

, , 
, .

ESU
(Eastern State
University ESU) .
ESU , 
,
. , 
, .
,
, .
, .
,
. 
.
.
, ,
. ,
.


, 
.
, 

. , 
.
,
.


, 
, . 
, 
, .

. ,
, .
. ,
, . 

.

25


, , 
.
, 

.

. 
.

. ,
, . , ,

.

3.

( , 
) , 
(use cases), (
actors) ( 
use cases diagrams).
, ,
.

. 

, .


, . :
;
;
.

.
:
1. ?
2. ?
3. ?
4. , 
?
5.
?
6. ?
7.   . 3.1.
UML
?

8. ?

9. ?
UML . . 3.1.

27



.
. ,
, 
? , .
, .
, , . 
.
, 
. .
.
. , 
, 
. , , 
.

, .


:
1.
2.
3.
4.

.
, .
.
, 
.
5.
.
, :
(Student), (Professor), (Register) 
(Billing system).
Rational
Rose:
1. 
Use Case View ( 
) .
2. 
New Actor (
). 
New Class.
3. , 
.

. 3.2.

. 3.2.

28


,
.
:

, 
;
, ;
, ;
,
.

Rational Rose 
:
1. , , View
Documentation ( ).
2. , .
3. .
. 3.3.

. 3.3.

(use cases) 
. , ,
. .
, ,
, .
,
:
1. ?
2. , , , 
?
3. , , ,
?
4. 
?


5. 
?
6.
?
7. 
?

29

. 3.4.
UML

UML . . 3.4.



. , , 
. ? .
: 
.
 .
:
; 
; . 
? ,
. , 
(, , )?
, (
, )?
, 
, . , ,
. ?
, (
) ().

;

;
,
, 
;
, 
, 
, .


:

;
;

30

;
;

;
;
.


Rational Rose 
:
1.
Use Case View (
) .
2. 
New Use
Case ( ).
.
3. .

. 3.5.


. 3.5.


. 

.
,
. 3.6.
. 
, ,
.
Rational Rose:
1. , .
2. 
. , View
Documentation ( ).

. 3.6.

31


(flow of events) 
, . 
, ,
. , 
. :

;
;
;
;
.


.
. 
.
.

, . 
:
X. <>.
X.1. .
X.2. .
X.3.  ( ).
X.4. .
X .

(Select Courses to Teach).

1.1.
 (Create Course Offerings) 
(Maintain Course Information) 
.
1.2.
,
. (E1)
(E2).
. : 
(Add), (Delete), (Review), (Print) 
(Quit).
(Add), S1: 
(Add a Course Offering).

32

(Delete), S2: 
(Delete a Course Offering).
(Review), S3:
(Review Schedule).
(Print), S4:
(Print Schedule).
(Quit): .
1.3. 
S1: (Add a Course Offering)
, 
. (E3). 
(E4).
. (E5).
.
S2: (Delete a Course Offering)
, 
. (E6). 
(E7).
.
S3: (Review Schedule)
(E8) 
, : , 
, , , . 
, , .
S4: (Print Schedule)
(E9). 
.
1.4.
E1: . 
.
E2: .
.
E3: . 
.
E4: . ,
. .
E5: . 
, .
.
E6: . 
.
E7: . 
, . .
E8: .
.
E9: . ,
. .


Rational Rose, .

33

, , 
Rational Rose :
1. .
2.  Open Speci
fication ( ).
3. Files ().
4. .
5.  Insert File
( ).
6. .
7. Open (),
.
8. OK, 
.
.
. 3.7.

. 3.7.



. (communicate
association), .
( 
), (

34

). , 
( ). ,
.
.
: 
. 
. ,
. (include relationship) , 
. ,
. 
, 
.
, 
. ( Rational Rose
2000 
.)
(extend relationship) :

;
, , 
;
, .

, , , 
.

. ,
. (
Rational Rose 2000
.)
UML (stereotype), 

. , UML
,
.

. 
. <<communicate>>
, , .
,
. 
, 
.
. 3.8.

35

<<extend>>

<<communicate>>
<<include>>

. 3.8.


(use case diagram)
, .
, 
() (
). . 
:

, ;
, , 
;
, .

Rational Rose:
1. Main ( ) Use Case
View ( ) , 
.
2. 
.
3. .
4.
.
5. 
.

.
Rational Rose:
1. Association (
) Unidirectional Association ( 
). ,

36


, 
Customize (),
.
2. 
.
, :
1. , Speci
fication ().
2. Stereotype () commu
nicate.
3. OK, .
4. .
Rational Rose :
1. Unidirectional Association.
2.
.
3. , Specification.
4. Stereotype include.
5. OK, .

Rational Rose
:
1. Unidirectional Association.
2. 
.
3. , Speci
fication.
4. Stereotype extend.
6. OK, Specification.

. 3.9.
Rational
Rose:
1. Use Case View (
) .
2.  New Use
Case Diagram ( ).
3. .
4. ,
.
. 3.10.

. 3.9.

. 3.10.

37

38



(activity diagrams).
, 
.

. 

.
, , 
. UML
, 
, ,
(. . 3.11).
Rational Rose :
1. Use Case View (
) .

. 3.11. UML

. 3.12.

39

2.  New
Activity Diagram ( ). 
New Diagram.
3. .
4. , .
. 3.12.


(. . 3.13).
Rational Rose:
1. Activity () .
2. , , 
, .
3. .

. 3.13.


(. . 3.14). 
.
Rational Rose:
1. State Transition () 
.
2.
.

40

. 3.14.



.
, ,
.
.
Rational Rose 
:
1.
2.
3.
4.
5.

Decision ( ) .
, .
.
State Transition .

.

. 3.15.
Rational Rose:
1. State Transition .
2. 
.
3. ,
Specification ().
4. Detail ().
5. Guard Condition () .
6. OK, .
. 3.16.

41

. 3.15.

. 3.16.

Rational
Rose:
1. ,
( Shift).

42


2. Format Style Rectilinear (
).
3. , 
.
. 3.17.

. 3.17.


, .
(synchronization bar) 
,
(
) . . 3.18. , 

.
Rational Rose:
1. Horizontal Synchronization (
) Vertical Synchronization ( 
) .
2. , 
.
3. State Transition ()

.
. 3.18.

43

. 3.18.

(swimlanes) .
, ,
.
Rational Rose:
1. Swimlane () .
2. ,
New Swimlane.
3. ,
Specification ().
4. Name ().
5. OK, .
6. .
7.
, .
. 3.19.

44

. 3.19.



.
, ,
. 
.

Rational Rose:
1. Start State ( ) End State (
) .
2. , 
.
3. , State Transition
() , 
.

45

4. , State Transition
, 
.

. 3.20.

. 3.20.

, 
,
. 

.

. 
.

46

 , 
. .
.
, ,
. 
, ,
.
, .

. 
, 
.
.
. 

.

.

4.

(object)
.  ,
, , , , , 
, , .
, 
. 
: , .

,
(state) ,
. 
, (attribute), 
. , (CourseOffering) 
:
. , 
, , .
.
(behavior) ,
. 
(operation) . 
.
(identity) , ,
. : 101,
1 101, 2 .
,
.
101, 1
UML 
, . . 4.1.
. 4.1.
UML


(class) (
), (), 
. , .

48


. , (CourseOffering)
:

, ;
, , 
.

101, 1 101, 2 , 
.
, .
, 
. , , 
,
, ,
. :
.

. ,
. 
, .
.
. , , 101,
1 , ? 101,
2? . , ,
. 
. , 
:
101, 1; 101, 1; 101, 2 ..
, (CourseOffering).
UML .
, 
, .
. 4.2.

. 4.2.
UML

. 4.3. ,

49

Rational Rose:
1. Logical View (
) .
2.  New
Class ( ).
New Class.
3. .
. 4.3.


.
. , 
,
. , 
, , .

. ,
. Rational Rose
Rational Unified Process , 
. , 
. 4.4.

. 4.4.


. :
! Rational Unified Process , 
, 
.

50

, 
.
, 
, . ,
, .
, , 
.

/
 (entity class) 
.
. 
, 
. ,
.
, 
( ). 
, .

. , 
, , , 
, .
 . 
, 
.


(boundary class) 
. 
( ). 

.
/.
, ,
. , , 
. 
, .
. 
. 
. 
. ,
, , ,
. 

.

51


.
.


(control class) 
, 
. 
, .
.

/. .
.
, 
. , .
 , ,
. : 
, , .
, , ,
? ,
. , 
. ,
.
/ 
. 
, .

Rational Rose:
1.
.
2. 
Open
Specification ( ).
3. General (
).
4. Stereotype
() 
. 
, 
Stereotype.
5. OK, 

.

. 4.5. , . 4.5.

52

, ( Notation (
) Options ()),
.


, 
. ,
. , :
, . 
, .
:
, .
, ,
, , .

, . 
:

, 
;
,
, ;
, , 
, ;

.

Rational Rose:
1. .
2. .
. 4.6.

. 4.6.

, .
,
,
. .

53

(package)
. 
. 
, , , .
,
(public classes), ,
. (implementation classes),
.

.
C

, ,
, .
 . 4.7.
UML
, 

.
UML (. . 4.7).
Rational Rose:
1. Logical View (
) .
2.  New
Package ( ).
3. .
, , . 4.8. 
.
Rational Rose:
1. , .
2. , .
3. , .
. 4.9.

. 4.8. ,

. 4.9.

54


(Add a Course Offering
to Teach), 
(Select Courses to Teach). 
.
,
.



. , , 
, ( ,
, , ). , 
,
.
(ProfessorCourseOptions). 
, , 
, (AddACourseOffering).

/
,
. : (Course),
(CourseOffering) (Professor).





(ProfessorCourseManager).
(
,
)
(. . 4.10).

, 
Rational Rose ,

.

. 4.10.

.
: , , ,
, 
. : ,

55

; , 
; 
. , 
: (Interfaces),
(UniversityArtifacts)
(PeopleInfo). 

(. . 4.11).



, 
. (class
diagrams)
.


. 4.11.
.
,
. . 
:

;
;
.

Rational Rose
.
, :
1. Main diagram ( )
, .
2. , .
3. .
4. .
. 4.12.
Rational Rose:
1. .
2. , .
3.
. 
Format Stereotype display (
).
4. , 
.

56

. 4.12.


. 4.13. , (CourseOffering) 
. , 
. 
.

. 4.13.

57

:
1. Tools Options ( ).
2. Diagram ().
3. Show Visibility ( )
.
:
1. .
2.  Options
Show Visibility ( ).
, , . 4.14.

. 4.14. ,

( 
, ). , 
.
: , 
. , 
. , 
. , ,
.
(),
(), (
) . UML

58

. ,
. , 
.
, .

, 
UML. : 
, .
.

. 
. , 
.

. 
. 
, .

5.


. 
. 
, , .
(scenario) . 
.
, , 
, .
, , , 
.

.
( 
) (  ). ,

. , 
.
, 
, . 
, 80%
. 
, , , ; 
, .
Rational Unified Process (use case
realizations) . 
, , ,
, 
use case. , 
,
use case, ,
. UML 
(. . 5.1). . 5.1.
UML


( ), 

60


Rational Rose :
1. Logical View ( 
) .
2.  New Use
Case ( ).
New Diagram.
3. Realizations.

Realizations . 5.2.

Rational Rose:
1. 
Realizations , 
.
2. Use Case (
) .
3. .

.
. 5.2.
4. 

Use Case Specification (


).
5. ( , ) Name
(). , 
, Rational
Rose (namespace).
,
Rational Rose , , 
use case.
6. Stereotype () use
case realization.
7. OK, .
Realizations . 5.3.
use case
use case Realizations

. ( UML
, Rational Rose.)
. 5.4 
Realizations.

61

. 5.3.

. 5.4.


, 
(interaction diagrams).
(sequ
ence diagrams) (collaboration diagrams). 
.

62


(sequence diagram) 
, .
, , ,
, . 

.
UML
, . 
,
( ). 
. 5.5.

101  2

101  7 :

:

. 5.5.

(, 101, 
1) (, ). 
.
(timeline),
. , , 
, ( ) 
( ).
. 5.6 UML
.
Rational
Rose:
1. Logical View ( 
) .
2.  New
Sequence Diagram ( ).
.
3. .

63

101  1
:


()

. 5.6. UML

. 5.7.

Rational Rose:
1.
, .
2. , .
3. .
4. Object () .
5. , 
.
6. .

. 5.7.

64

7. .
8. Object Message () .
9. 
.
10. .
11. .

(Create a Course) . 5.8.

. 5.8.

. 5.9. ,

65


Rational Rose 
:
1. , .
2. .
Rational Rose 
.
, : : .
,
.
(a course), 
(Course), . 5.9.




,
. 
,
.
, , 

. , 
.

, , : 
?
: . 
, , 
, .
: ? ( 
, ). 
. ,

, . , 
 , :
, .
. ,
.
.

66

Rational Rose:
1. Note () .
2. , .
3. , ,
.
4.
.


(collaboration diagram) 
.
, , . 
:

, ;
, ;
, .

UML , 
. 5.10.

Rational Rose:
1.
, .
2. Browse Create collaboration diagram (
) F5.
3. .
:

1:
()

101  1 :

. 5.10. UML ,

. 5.11.
.
.

67

. 5.11.

Browse Create Sequence Diagram ( 


) F5.



: , . 
. 
.
,
. 
, .



(Add a Course
Offering). . 5.12.

. , 
(participating classes).

Rational Rose:
1. .
2.  New
Class Diagram ( ).

68

. 5.12.

. 5.13. ,

69

3. .
4. , .
5.
.
6. .

. 5.13.

. 
.
, 
. .
. ,
. ,
, ,
.
, 
. 
(sequence diagrams) 
(collaboration diagrams).
.

, . 
. 
, , .

6.

.
. , 
, .
, . 
. , 
, .


(association)
. , 
, .
,
. ,
(Course) (ProfessorCourseManager) 
, 
. 
. UML
, , . . 6.1.

. 6.1. UML

Rational
Rose:
1. Association ().
, 
Customize () 
 .
2. .
3. .
. 6.2.

71

. 6.2.



.
. UML , ,
,  (), . 6.3.

. 6.3. UML

, , 
:
1. , ?
2. 
(, (Course) 
(CourseOffering))?
3. ,
?
, ( 101) 
.
( 101, 1 101, 2).

72


.
Rational Rose:
1. Aggregation ().
, 
Customize
() .
2. , 
, , 
.
. 6.4.

. 6.4.


 
. 
. , 
. , ,
1.
, 
.
? , 
, ,
1
Rumbaugh, James et al. ObjectOriented Modeling and Design. Upper Saddle River, NJ: Pentice Hall,
1991, p. 58.

73

, . , 
, ,
, .


. 
, . 
, ,
. ,
, : ,
.
, .
, .
,
.
Rational Rose:
1. , .
2. (. . 6.5).

. 6.5.


, , 
.
. , , 
.

74

, ,
. 
.
Rational Rose:
1.
, .
2.  Role Name
( ).
3. .
. 6.6 .

. 6.6.

, . 6.6, :

;
, .

.

, . 
, 
, . 
, , . 6.6?
.

. 
, 
,

75

. (employee) 
(employer), ,
.


(multiplicity)
, .

. 
:
1
0...*
1...*
0...1
5...8
4...7, 9

;
;
;
;
(5, 6, 7 8);
(4, 5, 6, 7 9).

Rational Rose:
1.
Specification ().
2. Detail () .
3. Cardinality ( 
).
4. OK, 
.
. 6.7.

. 6.7.

. 6.7 :

, 
. : 101, 1

76

( ) (
);

. :
( ) 101, 1; 
200, 2; 1, 3
( ).
,
.


, , 
.
(reflexive) .
, .
Rational Rose:
1. Association ()
Aggregation ().
2. .
3. .
4. .
5. 
.
. 6.8 
:

. 6.8.

77

, (prere
quisite), ;
, 
.


, 
. , 
. 
.
(.
7).


,
, . 6.1.
6.1.

. 6.9.

. 6.9.

78


. 
, 
(. . 6.10). A B, 
, A
B. A 
(client package), B  (supplier package).

. 6.10.


. , 
.




. 
.

. 6.11.

79


.
Rational Rose:
1. Dependency Relationship ( )
.
2.  
.

. 6.11.

.
, , 
.
.
.
.
, .
. , 
, .
, 
.
.
, , 
.
.
.
. A
B, , A
B.

7.


, 
. .
, 
. , (CourseOffering) 
. : ,
.
.
(structure) . 
, . ,
, . , 
(course) : (name), (definition)
(credit hours). ,
. 
, 
.

, 
.
 ,
.
. ,
(CourseOffering) : (offerNumber),
(location), (timeOfDay), (department),
(numberOfferingInDepartment).
,
.
,
(Department). 
, .



.

81

.  ,
(GUI), 
. 
( ..) , 
. ,
, 
(Add a Course Offering). 
,
(ProfessorCourseOptions). 
, , , . ,
, .
, , 
, ,
. 

, .
, , 
. 
.
, 
, , . 
, 
(addStudent). ,
, . ,
.
, , , 
.
. 
(calculateNumberOfStudent), , 
. 
, , .
(getNumberOfStudent). 
.
Rational Rose:
1. ,
.
2. , .
3.  New Opera
tion ( ) Operation Specification
( ).
4. .
5. OK, .
,
.

82

. 7.1.
,
. , 
. , ,
, , 
. 
(validateProfessor).

. 7.1.

Rational Rose:
1. .
2.  New
Operation ( ).
3. .
(Course) . 7.2.


, , 
, . 
,
, . 
(operation signature).

83


, .

. 7.2.

Rational Rose:
1. + , 
.
2. , .
3. .
(SetProfessor) 
(Course) . 7.3.

. 7.3.


. ,
, (fundamen
tal) , , , (String),

84

.
. ,
(setProfessor) (Course)
(Professor) (CourseOffering).
, :

;
.

, , 
, 
(dependency relationships). (
12.) 
, ,
. ,
. ,
.


,
,
. ,
. , ,
,

. 7.4.

85

. , ,
.
Rational Rose:
1. .
2.  New
Attribute ( ).
3. .
(Course) . 7.4.



, .
:
15 . :
, .
Rational Rose:
1. + , 
.
2. , .
3. .
(name) (Course)
. 7.5.

. 7.5.


.
. 
.

:
1. .
2.  New
Class Diagram ( ).
New Diagram.
3. .

86

Query ():
1.
2.
3.
4.

, .
Query Add Classes ( ).
.
>>>>,
.
All >> ().

Rational Rose:
1. , .
2. Query Filter Relationships ( 
).
3. None () Type (),
.
4. OK, Relations (
).
Rational
Rose:
1. .
2.  Options
Select Compartment Items ( ).
3. , 
.
4. >>>>.
5. OK, Edit Compartment
( ).
Rational Rose 
:
1. .
2.  Options
Show All Attributes ( ).
3.  
Options Show All Operations ( ).
,
Show All Attributes ( ) Show All
Operations ( ) 
, Tools Options ( ).
Rational Rose:
1. .
2.  Options
Stereotype Display ( ),
: None

87

() , Label () 
, Icon () , 
.
(Attributes and
Operations) (UniversityArtifacts)
. 7.6.
.

. 7.6.


.
, ,
.
.
, 
. (grade) . 
? ,
. , 
.
.
(association class),
. 
(report card),
.

88

Rational Rose:
1.
2.
3.
4.
5.

Class () .
, .
.
.
Association Class ( )
.
6. 
, .
7. ,
.
. 7.7.

. 7.7.

, .
.
.
, . ,
, . 
, , 
.

.
, : ,

89

 , , 
.
, 
, 
. , 
.
.
, ,
. 
.

8.

(inheritance) ,
/ 
. ,
(subclass) (super
class). , (isa)
, (kindof). , 
, . , 
, ,
. 
, .
.

, , 
.
.
, C++, 
, ,
Smalltalk, .
.
,
.

. .

(generalization) ,
.
,
.
() (). ,
, .
, , ,
, ,
. , ,
, .

91

, , 
. (,
), , 
.
, .

(specialization) , 
.
, . , 
. , 
,
.
(SeniorCitizen) (Regist
rationUser) , .
(overridden).
, ,
.
Rational Rose:
1. , 
.
2. Class () , 
, .
3. . 
.
4. Generalization () .
5. .
6. .
. 8.1.

. 8.1.

92


( )
(discriminator). ,
, ,
.
, (Course) 
. (OnCampusCourse) 
(OffSiteCourse) ,
. ,
, .
.
,
. 
. , 
, ? 
? ?

.
Rational Rose:
1. , 
.
2. Class , ,
.
3. . 
.
4. Generalization .
5. .
6. , : 
Generalization , 

( ).

.
. 8.2.
,
, ,
.
, 
. 
? . 
, . 8.3.
(name) (IDNumber) ,
(RegistrationUser). 
(CourseOffering). :

93

. 8.2.

. 8.3.

;
, 
(
4 11). ,

94

:
.
? .
? . ,
,
. 
. , 
, . .
,
.
Rational Rose:
1. + ,
.
2. , .
3. .
4. .
5. 
.
. 8.4.

. 8.4. ,

95



, (, 
, ). 
(
, , 
, ). 
,
.
: C++
PowerBuilder.

, ,
. : 

.


. ,
, . 
. 
. , .
(Student)
(FulltimeStudent) (ParttimeStudent).
. 
, :

? ,
;
(, ,
)? 
, 
( 
, , ,
..).

. 
.
. (), 
, ,   (
) . 8.5.

96

. 8.5.

,
. ,
.  .
, ,
.
:
. ,
. 
, 
, .

9.


,
.
. (statechart diagram) 
, , 
, ,
.
, 
. 
, , 
, .

.

. 9.1.

98

,
, , .
Rational Rose:
1. .
2.  New
Statechart Diagram ( ).
New Diagram.
3. .
4. , + 
, + State/Activity
Model ( ), 
.
(Course
Offering) . 9.1.

(state) ,
, 
.
. , 
( ) ( 
). , 
. ,
. 
. .
, 
. , 
, , , 
, ( ,
). ,
, .
UML 
. . 9.2.
,
. . 
, , 
. ,

( 
, ). 

. 9.2. ,
UML
,

99

(CourseOffering) : 
( , ), (
), ( ),
( ).
Rational Rose:
1. State () .
2. , .
3. .
. 9.3.

. 9.3.


(state transitions)
( , ).
.

. , 
 . 

( ). ,
. 
, 
.

100

Rational Rose:
1.
2.
3.
4.

State Transition () .
.
.
, .

. 9.4.

. 9.4.


, , 
(start state) (stop state).
,
. 
UML 
(. . 9.5).

. 9.5. UML

101

, 
, (.
. 9.5).
Rational Rose:
1. Start ( ) .
2. , 
.
3. State Transition .
4. 
.
. 9.6.

. 9.6.

Rational Rose 
:
1. Stop ( ) .
2. , 
.
3. State Transition .
4. 
.
. 9.7.

102

. 9.7.


(guard condition)
/ (action).
(event). , .
, .
, , .
,
. (private),
. UML
, . 9.8.
Rational
Rose:
1. .
2.  Specification
(), .
3. Detail ().
4. , .
5. OK, 
.
. 9.9.

103

[ ] /

^ .

. 9.8. UML

. 9.9.


, ,
(entry action) .
, , ,
(exit action). , , 
(activity).
. 
, .

104

,
. UML
, . 9.10.

:
: ^ .
:
: ^ .
:
: ^ .

. 9.10. UML

. 9.11.

, 
Rational Rose :
1. .
2.  Open Specifi
cation (), .
3. Actions ().
4. Action ().

105

5.  Insert (
). .
6. , 
Action Specification ( ).
7. : on entry ( ), on exit (
), on event ( ).
8. .
9. : action () send event ( ).
10. , .
11. OK, Action Specification.
12. OK, State Specification.
. 9.11.

, , 
.
, 
. , 
.

.

10.


(homogenize) , ,
. 
, . ,
. 
,
,
. ,
.
.

. ,
,
. , 
,
. (, 
) ( ) 
. , 
.


,
. 
. .
. , 
, . , 
, , 
, .
.
. 
.
(sequencing logic) .
, .

107


(Maintain Course Information)
(Create Course Catalog). 

. , ,
.



 , , 
. , 
(StudentInformation), ,
, , .

(Transcript) .

. , .
.
(Course).

, , , 
, .
, (Department).

.


. 
:

 ;
 .

.
. ,
,
  .

(Select Courses to Teach).
.

,
. 
.

108


,
, , 
, ,
. 
, ,

.

.
, 
( ).
, , , 
.



, .
, , 
. ,

. :
. ,

.
, , , 
. , ,
, , , 
. , , ,

, .


, ,
,  , 
 .

 . ,
. 
, 
. , , 
.

109


!
. ,
. 
, ,
, .


. ,
. 
:

;
;
.


.
.
: ,
.

11.



: ,
.
,
. , 
,
.

 . 
, ,
. 

1.
.
. 
. , 
,
2.

.  ,

3.


,
. 
, 
, ,
1

Booch, Grady. Object Solutions. Redwood City, CA: AddisonWesley, 1995.

Jacobson, Ivar. The Objector Software Development Process. Draft edition.

111

,
, , ,
1.

4 + 1

2 (. . 11.1).

UML .

. 11.1. 4 + 1


(logical view) 
, 
. ,
,
.
UML 
(, , , , .).
, 
.
,
.
, .
1
Kruchten, Philippe. Software Architecture and Iterative Development. Santa Clara, CA: Rational
Software Corporation, April 1994, p. 53.
2

112

(tactical design). 
, 
, 1.
: , 
, , , 
, , .
, 
.
, .
, (cohesion), (closure) 
(reuse) . (Robert
Martin)
 ++ 
.
Rational Unified Process UML. : UML 

, 
.


C++, 

, C++. 
,
() ,
(GUI Controls).

( )
. , 
. ,

.
, . 
C++ catch throw. 

(Error Handling). ,
(Foundation). ,
, 
. 11.2.

, (global
packages).
1

Solutions. Redwood City, CA: AddisonWesley, 1995.

113

. 11.2.

Rational Rose
:
1. .
2.  Open Specifi
cation (),
.
3. Detail ().
4. Global ().
5. OK, 
.


(implementation view) 
.
, , 
, .
(component view)
, .

. , 
. . 11.3
.

114

,
&

. 11.3.

. 11.4.
UML

UML
. . 11.4.
Rational Rose:
1. Component View (
) .
2.  New
Package ( ).
New Package.
3. .

.

. 11.5.

115

Rational
Rose:
1. Main Diagram ( ) 
Component View ( ) , 
.
2. .
3. ,
.
4. , Dependency
( ) , 
.

. 11.5.



, .
(, C++ .h .cpp, Java .java, PowerBuil
der .pbl).  .
.
C++ .
. ,
. 

, .h 

.cpp. ,  
. 
, ,  . 11.6.
. UML
UML

. 11.6.



, 

.cpp.
Rational Rose:
1. .
2. Component () .
3. , . 
.
4. .
. 11.7.

116

. 11.7.


Rational Rose 

:
1.
.
2. 
Open
Specification ( ).
3. Realize (
).
4.

.
5. 
Assign
().
6. OK, 

.

. 11.8.

117



.
(Course
Offering) . 11.8.


(process view) 
. ,
, , , ,
. 
.
<<EXE>>

(runtime) 
(executable)
. 
.
, 
Java, ActiveX 
. 



.
. 
. 11.9.
, 

, 
(lollypop notation) . . 11.9.
Rational Rose
, ,
. , 
.

(DLL)
. 
.
.
, 
; 

. .
(ProfessorOptions.exe)
. 11.10.

118

. 11.10.


(deployment view)
(processing nodes). 
(processing elements) 
. 
, , , .
,
(deployment diagrams). 
. 
, , 
.
,
.

. 
: , , ,
,
, .



, 

119


: ,
.
Rational Rose:
1. Rational Rose . 
, .
2. , Processor ()
, .
3. .
4. Connection
() , 
.

. 11.11.

. 11.11.


(use case view)
, ,
. 
, , 
.

120


: , ,
. 
. 
,
. 
, . 
, .
. 
.
.

12.

(iteration release plan)
. 
, 
1.
:

;
;
.

;
;
, ;
, ;
,
2.

, , 
.
, 
. 
, , 
, .
,

3.

.
( ) 4.
. 12.1.
1

Booch, Grady. Object Solutions. Redwood City, CA: AddisonWesley, 1995.

Kruchten, Philippe. A Rational Development Process. Rational Software Corporation. Available at


www.rational.com.
3

Booch, Grady. Object Solutions. Redwood City, CA: AddisonWesley, 1995.

122

. 12.1.


1:



2:


3:


1 , .
, . 

, . 
,
( ,
). 3 .



. :
, ,
. 
.
, . ,
, .

123



, 
(Select Courses to Teach), ,
:

. 
;
, 
(ProfessorCourseOptions). 
: (Add Course), (Delete Course), 
(Review Schedule), (Print Schedule).


(Add Course) . , 

.
Rational Unified Process UML, 
.

. 
.
(Addition). :

(Course name);
(Course number);
(Course offerings);
OK;
(Cancel);
(Quit).

, 
. 
. OK .

. .
. ,
. 
, ,
Rational Rose .


, , 
. , , 
, . 
, .
.

124


. 12.2. 
, .

. 12.2.

. 
, Tools
Options ( ), Diagram ()
Label () Stereotype display (
).


(design patterns)
. 
. ,
1. 
.
.
, , , 
, . , 
(Abstract Factory)
(RegistrationUser) .
1

Booch, Grady. Best of Booch, SIGS Reference Library. New York, NY, 1996, . 167.

125

. 
. (E. Gamma) : 
 (Design
Patterns: Elements of Reusable ObjectOriented Software), 
AddisonWesley 1995 .



: (navigation), (containment),
(refinement) (multiplicity implementation).

.
, , 
. 
( )
.
Rational Rose:
1. 
.
2.  Navigation
(), .
. 12.3.

. 12.3.

126


. .
(
) . 
.
Rational Rose:
1. , 
.
2. Detail () ,
.
3. Containment
().
4. OK, .
( 
(ProfessorCourseOptions)
(AddACourseOffering)) (
(ProfessorCourseOptions)
(ValidIDList)) . 12.4.

. 12.4.


(dependency relationship). : ,

127

() ( ),
.
, . 
 
.
, 
.
Rational
Rose:
1. Dependency Relationship ( )
.
2. , .
3. .
(CourseOffering)
(DBCourseOffering) . 12.5.

. 12.5.


, ,
, . 
 ( 
). 
, . (
) .

128

, .
Rational Rose
.



(Add a Course to Teach)
:

(ProfessorCourse
Options) (AddACourseOffering);

(ValidIDList);
(Course);
(CourseOffering);
(Professor);
(DBCourseOffering).



, 
. 

, . 
.




. 

.


.
,
.



. , ,
.
, 
. .
.

129

(Transcript) ,
, . 
(
). , ,
.


, , 
,
. ,
(addProfessor) 
. 
(Review schedule).
. , 
. , (Create catalog)
, 
. ,
.


,

.

. 12.6.

130

, 
, . 12.6 12.7. , , 
.

. 12.7.


.

, .
. , , 
(integer) (string) .

, . 
(parameter list) 
(return class).
.
: (public), (protected) (private).
, 
. , 
,
.

131


Rational Rose:
1. 
.
2.  Open Specifi
cation ( ).
3. Attributes ().
4. 
.
5. .
Rational Rose:
1. 
.
2.  Open Specifi
cation ( ). Class Specification
( ).
3. Operations ().
4. , Operation
Specification ( ).
5. General ().
6. Detail ().
7. Arguments ().
8.  Insert (
). .
, .
9. OK, Operation Specifi
cation.
10. OK, Class Specifi
cation.
11. ,
, Tools Options
( ).
12. , 
Format Show Operation
Signature ( ).

, :
: =
( : = ) : 


. 12.8.

132

. 12.8.



. , :

;
;
.

, , 
, . 
.
,  
, .


, 
C++, , , 
. , .
Rational Rose
.
Rational Rose . 
, , 
, . 
Rational Rose .

133

,


. 
, 
: , .

.
. 
, , . 
, .

, . ,
, . 
( ) .
, , 
. , 
. , , 
, ,
( ).



, 
, (
). 
(reverse engineering) Rational Rose, 
.
. 
Rational Rose 2000 .


. , ,
. 
, 
.
,
.

, .

134

,
, . ,
,  . 

.
. , 
, , , 
.
: , ,
;
, . , ,
. 
.
(virtual) (pure virtual).
, 
(, , 
, C++).
Rational Rose 2000 . 
, , 
, .

.
, .
, .

.

C++

C++ .


1. .
2. .
3. C++ .
4. .
5. .
6. .
7. .

1. .
2. .
3. .
4. .
5. .
6. Rational Rose.
7. Rational Rose.


1.
, , , 
. , ,
, .
, , ,
/ (get/set methods).
/ 
, . 
(, , , 
, ) .

136

Rational Rose 2000 UML

. , 
C++, .
: (.h) 
(.cpp).
,
, .
.
: , ,
, , , , 
.
Rational Rose:
1. Tools Options ( ).
2. C++.
3. Type
().
4. Clone (),
Clone Property Set ( ).

. .1.


5.
6.
7.
8.
9.
10.
11.
12.
13.

137

.
OK, .
, .
.

.
.
Apply (), .
.
OK, Options (
).

(Virtual Destructor)
. .1.

2.

Rational Rose 
, . 
h, .
(Package Specification) h, 
.
(Package Body),
.cpp, .
Rational
Rose:
1. 
, .
2.
.
3. 
Open
Specification ( ).
4. 
Ste
reotype ().
5. OK, 

.

. .2.

Rational Rose:
1.  . .2.

, .

138

Rational Rose 2000 UML

2. .
3.  Open Speci
fication ( ).
4. Package Specification (
) Stereotype.
5. Package Body ( )
Stereotype.
6. OK, 
.
h cpp C++
. .3.

. .3.

3. C++

C++. C++ (
Notation () , 
Tools Options ( )), Rational
Rose .
Rational Rose:
1.
.
2.  Open Speci
fication ( ).
3. Language () C++.

139

4. OK, 
.
(Course) . .4.

4.
,
.
Rational Rose:
1. ,
h cpp, .
2. , 
h.

5.

(, ) 
. ,
, 
.
Rational
Rose :
1.
.
2.  Open Speci
fication ( ).

. .4.

. .5.

140

Rational Rose 2000 UML

3. C++.
4. Set () .
5. OK, 
.
(Virtual Destructor)
(RegistrationUser) . . .5.

, . ,
, .
Rational Rose:
1.
.
2.  Open Specifi
cation ( ).
3. C++.
4. Set () .
5. , 
.
6. 
.
7. .
8. OK, 
.

6.
,
. , 
. 
, 
.

Rational Rose:
1. , 
.
2. Tools
C++ Code Generation (
C++ ).
3. 
Code Generation
Status ( ).
Code Generation Status
. .6.

. .6. Code Generation


Status

141

7.
Rational Rose Log
(). ,
, .
, 
.
:

Error: Missing attribute data type. Void is assumed.


(: . void.);
Warning: Unspecified multiplicity/cardinality indicators.
One is assumed. (: 
. .);
Warning: Missing operation return type. Void is assumed.
(: .
void.).

Log . .7.

. .7. Log Rational Rose


C++
1.
C++ (Rational Rose C++ Analyzer)
, 
. :

142

Rational Rose 2000 UML


(Caption) ;
(Directories) , . 
, ,
;
(Extensions) , 
;
(Files) , ;
(Defined Symbols)
(Undefined Symbols) ;
(Categories) ,
;
(Subsystems) ,
;
(Bases) , 
;
2 (Type 2 Context) ,
;
(Export Options) , 
Rational Rose.

.pjt.

. .8. C++

143

C++:
1. Tools C++ Reverse Engineering (
C++ ) C++.
2. File New ( ).
C++ . .8.

2.
, , . 
( ).

.

C++:
1. Caption (),

(. . .9).
2. .
3. OK,
.

. .9.
Caption

3.
, .
, ,
.
C++
:
1. Directories (),
Project Directory List ( ) . . .10.
2. Directory Structure ( 
).
3. Add Current ( ),
.
4. Add Subdirs ( ),
.
5. Add Hierarchy ( ),
.
, 
. 
, .
, 
, , 
.
.

144

Rational Rose 2000 UML

. .10. Project Directory List


, . ,
.
C++:
1. Base ( ),
Base Project ( ) . . .11.

. .11. Base Project

145

2. .
3. .
4. Add (), 
.

4.
1, 2 3. 
,
.
.
C++ , 
#include.
, . 
C++, , 
, . 
, .
C++
:
1. , .
2. Action Set Type ( 
).
C++ .

. 
. .
:

(Unknown): ;
(Stale Data): 
;
(Analyzed): .
;
(CodeCycled): 
, .
;
(Excluded): , 
, ;
(Has Errors):
;
(No Source): ;
(Unanalyzed):
.

C++:
1. .
2. .

146

Rational Rose 2000 UML

3. Action Analyze ( )
Action CodeCycle ( 
)
Rational Rose.
. .12.

. .12.

5.
Log (). 
, .
.
:

(Unresolved reference):
, . 
, 
;
(Missing language extension):
.
;

147

 (Contextsensitive source file): 


, .
.

, ,
. .13.

. .13.

6. Rational Rose
,
. , 
, ,
, .
, 
Rational Rose. , 
Rational Rose .
C++ :

(RoundTrip): , 
. 
.red.

148

Rational Rose 2000 UML


(First Look): .
.mdl.
(DetailedAnalysis): . 
.mdl.

,
.
C++:
1. .
2. Action Export To Rose ( 
Rational Rose).
3. Option Set ( ) 
.
4. OK Overwrite ()
Rational Rose.
Export To Rose ( Rational Rose) . .14.

. .14. Export To Rose

7. Rational Rose
.red
Rational Rose. 
, , ,
.
Rational Rose:
1.
2.
3.
4.

, .
File Update ( ).
.red.
OK, Update Model
From ( ).

B.

Visual C++ Visual Basic

Visual C++ Visual Basic .


1. Visual C++ Visual Basic .
2. .
3. Model Assistant
Tool.
4. Code Update Tool.
5. .

1. Visual C++ Visual Basic 
Model Update Tool.
2. .


1.
Visual C++ Visual Basic


,
.

Rational Rose:
1.

.
2. 
Open
Specification ( ).

. B.1.

150

Rational Rose 2000 UML

3. Language () .
4. OK, 
.

(ProfessorCourseOptions) . B.1.

2.
.
Visual C++ Visual Basic.
Rational Rose:
1.
.
2.  Open Speci
fication.
3. Realize ().
4. ,
, .
5.  Assign
().
6. .

. B.2.

. B.2. Realize

151

3.
Model Assistant Tool
Model Assistant Tool 
Rational Rose Visual C++ Visual Basic.
Visual Basic Model Assistant Tool 
, , , , , , 
. Get, Let Set
, 
. Visual ++ Model Assistant
Tool , 
, .
Preview ( ) , 
. ,
.
Model Assistant Tool , :

, , Visual C++
Visual Basic;
Visual C++ Visual Basic.

Model Assistant Tool


Rational Rose.

. B.3. Model Assistant Visual Basic

152

Rational Rose 2000 UML

Model Assistant Tool:


1.
.
2.  Model
Assistant.
Model Assistant Tool Visual
Basic Visual C++ . B.3 B.4.

. B.4. Model Assistant Visual C++

4.
Code Update Tool
Code Update Tool Visual
C++ Visual Basic. , 
.
Code Update Tool:
1. 
.

. B.5. Code Update Tool

. B.6.

153

154

Rational Rose 2000 UML

2.  Update
Code ( ).
Code Update Tool . B.5.
Code Update Tool
Rational Rose.

5.
Code Update Tool
. Summary ( )
, , , 
Log ().
Code Update Tool
. B.6.


1. Visual C++
Visual Basic Model Update Tool
Visual C++ Visual Basic
, .
Model Update Tool.
.

. B.7. Model Update Tool

155


Model Update Tool :
1. Tools Visual C++ Update Model from Code
( Visual C++ ) Tools
Visual Basic Update Model from Code ( Visual Basic 
).
2. .
Model Update Tool . B.7.

2.
Model Update Tool 
. Summary 
, , ,
Log.
Model Update Tool
. B.8.

. B.8.

C.
Visual Basic
, 
(DLL) Visual Basic (
, Rational Rose Enterprise Rational Rose Professional
Visual Basic Edition). Visual Basic , :
AddIns AddIn Manager (
), Visual Basic
OK. Rational Rose 
, .

ActiveX
Visual Basic , ,
:
1. Tools Options ( ).
2. Notation ().
3. Default Language ( )
Visual Basic.
4. Diagram ().
5. Label ()
Stereotype display ( ).
6. OK, Options (
).
Visual
Basic:
1. Tools Visual Basic Options ( Visual
Basic ).
2. Generate debug code ( 
) Generate errorhandling ( ).
3. OK, Visual Basic
Properties ( Visual Basic).
Payclerk:
1. + Logical View (
) .
2. Main ( ), .

157

3. Class () .
4. , .
5. Payclerk.
Payclerk :
1.
.
2. Documentation () Payclerk
Payclerk .
3. Operations ().
4. .
5.  Insert (
). .
6. calcPay.
7. OK, 
.

calcPay:
1. + Logical View 
.
2. + Payclerk.
3. calcPay,
.
4. Return Class ( )
Currency.
5. Detail ().
6. .
7.  Insert.
.
8. rate.
9. Type () Integer.
10. OK, 
.
IPayroll:
1. Logical View.
2.  New
Interface ( ). 
(Interface).
3. IPayroll.

:
1. Main Logical View (
), .

158

Rational Rose 2000 UML

2. IPayroll
.
IPayroll:
1. IPayroll 
.
2.  New
Operation ( ). .
3. calcPay(rate:In
teger):Currency (, ).
Payroll:
1. Logical View.
2.  New
Class ( ). .
3. Payroll.
Payroll :
1. Main Logical View, .
2. Payroll
.
IPayroll Payroll:
1. Realize () .
2. Payroll
IPayroll.
Payroll Payclerk:
1. Unidirectional Association ( 
) .
2. Payroll
Payclerk.
:
1.
Payclerk.
2.  Role Name
( ).
3. myClerk.
:
1.
Payclerk.
2.  Private
().
:
1.
Payclerk.

159

2.  Multiplicity:1
(:1).
IPayroll 
Model Assistant Tool :
1. IPayroll
.
2.  Model
Assistant.
3. IPayroll Model Assistant.
4. Instancing ( ) 
MultiUse ( ).
5. OK, Model Assistant.
Payroll
Model Assistant Tool:
1. Payroll
.
2.  Model
Assistant.
3. Payroll Model Assistant.
4. Instancing ( ) 
MultiUse ( ).
5. + Implements Classes
( ) , .
6. + IPayroll, 
.
7. IPayroll_calcPay.
8. Public ()
Access ().
9. + Properties ()
, .
10. + myClerk,
.
11. myClerk.
12. New ().
13. OK, Model Assistant.
PayrollCalculator:
1. Component View
( ) .
2.  New
Component ( ).
.
3. PayrollCalculator.

160

Rational Rose 2000 UML

PayrollCalculator:
1. PayrollCalculator
.
2.  Open Speci
fication ( ).
3. Stereotype ()
ActiveX DLL.
4. OK, 
.
:
1. Main ( )
Component View ( ), .
2. PayrollCalculator 
.
PayrollCalculator:
1. PayrollCalculator
,
.
2. Realize ().
3. IPayroll, .
4. Shift.
5. Payroll.
6. Payclerk.
7. .
8.  Assign (
).
9. OK, 
.
Visual Basic:
1. PayrollCalculator ,
.
2. Tools Visual Basic Update code (
Visual Basic ) Code Update Tool.
3. Finish () Code Update Tool.
4. .
PayrollCalculator Filename ( )
Save ().
5. Visual Basic ,
Form1. Code Update Tool , 
, . 
Form1 Synchronize (
) OK .

161

6. 
. Close (),
Code Update Tool.
Payclerk:
1. Visual Basic calcPay Payclerk.
2. ## Your code goes here CalcPay = rate *
40.
3. IPayroll_calcPay IPayroll.
4. ## Your code goes here IPayroll_calcPay =
myClerk(1).calcPay(rate).
5. Project PayrollCalculator Properties (
PayrollCalculator).
6. Startup Object ( )
(None).
7. OK, 
.
8. File Make PayrollCalculator.dll ( 
PayrollCalculator.dll).
9. OK Make Project ( 
), .
10. File Exit ( ) 
Visual Basic.

ActiveX

, 
. . ,
. .
,
( DLL). .
:
1. + Use Case View (
) .
2. Main ( ) Use
Case View ( ), .
3. Actor () ,
, .
4. Manager.
5. .
6.  Options
Stereotype display Icon ( ).
7. Use Case () , 
, .

162

Rational Rose 2000 UML

8. Display Pay.
9. Unidirectional Association ( 
) .
10. Manager
Display Pay.
:
1. Logical View (
) .
2.  New Use
Case Diagram ( ). 
.
3. Realizations.
4. Realizations, .
:
1. Use Case , 
, .
2. , 
.
3. Name () Display Pay. 
, .
Rational Rose 
(namespace). 
, , 
Display Pay, .
4. Stereotype () use
caserealization ( ).
5. OK, 
.
6. , 
. . OK,
.
7. .
8.  Stereotype
display Icon ( ).
:
1. Display Pay
.
2.  New
Sequence Diagram ( ).
3. Display Pay for an Employee.
4. ,
.

163


:
1. Manager
.
2. Object () ,
, .
3. aPayForm.
4. Object Message () .
5.
aPayForm.
6. display pay for joe.
7. Object ,
, .
8. Joe.
9. Object Message .
10. aPayForm 
Joe.
11. get pay rate.
12. Object ,
, .
13. aPayClerk.
14. aPayForm 
aPayClerk.
15. calculate pay for this rate.
16. Message to Self ( ) 
.
17. aPayForm,
.
18. display pay.
PayrollForm Employee:
1. Logical View (
) .
2.  New
Class ( ).
3. PayrollForm.
4. PayrollForm .
5.  Open Speci
fication ( ).
6. Stereotype Form ().
Visual Basic , 
, .
, , 
Visual Basic.

164

Rational Rose 2000 UML

7. OK, .
8. PayrollForm 
Documentation () this form displays the weekly pay of
an employee.
9. Logical View (
) .
10.  New
Class ( ).
11. Employee.
12. Documentation () an Employee
is someone who is paid by the Company.
:
1. + Component View (
) .
2. Main ( ),
.
3. (Explorer)
PayrollCalculator.dll, .
4. .
5. Full Import ( ).

:
1. Display Pay for an Employee
, , 
 Open ().
2. + Logical View
, .
3. PayrollForm aPayForm.
4. Employee Joe.
5. + COM
Logical View, .
6. + Payroll
Calculator Logical View, .
7. Payroll aPayClerk.
:
1. , , .
, Visual Basic.
get pay rate 
 <new operation> (
). 
.
2. Name () getRate.

165

3. Return Class ( )
Currency. , Visual Basic ,
, Currency .
4. OK, 
.
5. calculate pay for this
rate.
6.  IPayroll_
calcPay.
:
1. + Logical View
, .
2. Main ( ), .
3. Query Add Classes ( 
). Logical View.
4. All >> (),
PayrollForm Employee.
5. Package () PayrollCalculator.
6. All >>, IPayroll.
7. OK, Add Classes (
).
8. Unidirectional Association ( 
) , PayrollForm
Employee.
9. Employee.
10.  Role Name
( ) anEmployee.
11. Employee.
12.  Multiplicity:1
(:1).
13. Unidirectional Association ,
PayrollForm Payroll.
<<coclass>>.
14. Payroll.
15.  Role Name
( ) myPayClerk.
16. Payroll.
17.  Multiplicity:1.

Model Assistant Tool:
1. PayrollForm.
2.  Model Assis
tant.

166

Rational Rose 2000 UML

3. + anEmployee ,
.
4. anEmployee.
5. New ().
6. + myPayClerk ,
.
7. myPayClerk.
8. New ().
9. OK, Model Assistant.
:
1. + Component View (
) .
2. Main ( ), .
3. Package () ,
, .
4. Manager Options.
5. + COM
Component View ( ),
.
6. PayrollCalculator
.
7. Dependency ( )
, Manager Options 
PayrollCalculator.
8. Manager Options , 
.
9. Component () ,
, .
10. ,
.
11. Name () DisplyPay.
12. Visual Basic , 
, Language () Visual
Basic.
13. Stereotype () EXE.
14. OK, 
.
15. PayrollForm 
DisplayPay.
16. Employee
DisplayPay.
17. + PayrollCalculator
Component View ( ),
.

167

18. PayrollCalculator 
.
19. Dependency ( )
, DisplayPay
PayrollCalculator.
:
1. DisplayPay, .
2. Tools Visual Basic Update code (
Visual Basic ) Code Update Tool.
3. Finish () Code Update Tool.
4. Form1 Synchronize
() OK,
.
5. 
. Close (),
Code Update Tool.
Visual Basic:
1.
2.
3.
4.
5.

Visual Basic Employee.


getRate: getRate = 10.
PayrollForm.
.
Form_Load:
Dim theRate As Integer
TheRate = anEmployee.getRate
Text1.Text = myPayClerk.IPayroll_calcPay(theRate)

6. Project Display Pay Properties ( 


Display Pay).
7. Startup Object ( )
PayrollForm.
8. OK, .
9. , 400.


(Automatic transition) ,
.
(Aggregation) ,
.
(Actor)  ( ) ,
.
(Architecture) ,
,
.
(Association class) , ,
,
.
(Association) 
.
(Attribute) , . 
.
(Base project)
.
.
(Class library) ,
, .
 (Business goals) 
,
.
(Visual Modeling)
.
(Action) , 
. ,
.
(Activity) , . 
.
(Collaboration diagram) , 
,
.
(Deployment diagram) ,

.
(Class diagram)
.

169

(Component diagram) ,
,
, (runtime) (executable) .
(Sequence diagram) ,
, .
(Use case diagram) 
, .
(Statechart diagram) ,
, , ,
, .
(Design) .
(Inception) .
(Iterative and incremental
life cycle) , 
.
(Iteration plan)
(releases), .
(Class) (
), (),
( ) .
(Key mechanism) , 
.
(Synchronization bar) 
, , 
. , 
.
(Model) ,
.
(Use case model) ,
.
(Inheritance) , 
/ .
(Generalization) ,
.
(Object) ,
.
(Operation) ,
. .
(Requirement analysis)
.
(Guard) , TRUE
.
(State transition) 
.
(Transition) (
, , ).

170

Rational Rose 2000 UML

(Subclass) , 
.
(Polymorphism) ,
, .
(Use case)  .
.
(Consistency checking)
( ) ( )
.
(Elaboration) 
; .
(Proof of concept prototype) , 
, 
.
(Partition) , .
(Implementation)
.
(Swimlane) 
. 
.
(Layer) .
(Construction) 
.
(State) ; 
, .
(Specialization) , 
, 
.
(Stereotype) ,
. , 
UML.
(Superclass) ,
.
(Scenario)
.
(Test) .
(Decision point) ,
.
(Unified Modeling Language UML)
, , 
 .
(Controlled unit) , 
, .
(Background problem statement)
, . 
.


O
OMG 17

R
Rational Unified Process 19, 49, 59,
123

U
UML 16, 22, 170

15

95
71, 168
126
48

UML 26
26, 168
27
"" 27
19
49
52
97

4+1 111
111
168
110

113
117
113
118

33
70, 168
87, 168

85
47, 168
85
94
130
84
131

21
21
19

18
121
121
15, 168
20, 118
133
C++ 141
Visual Basic 154
Visual C++ 154
76, 108

172

Rational Rose 2000 UML

55

35

54

65
50


Rational Unified Process 19
38
83
18
106
18

125

44
44
168
39

66
168
66

38
38
55
62
65
62
65
62
35
66
97, 169
92

28
85
52
82
31
109
61
133

47
18

Rational Unified Process 20

31
50
18, 169

50
55
52
107
90
49
106
47, 169
116
53
47
65
107
49
49
50
51
123
*
54
50
53


33

115
116
117
115
121

42, 169
59, 111

15, 169
106

127
75

73
34, 125

92
95
90
90, 169
132
91
91
57
15

90, 169
53

59
47
47, 169
65
106

82
47, 169

81
94
130
82, 131
80

19, 169

71
33, 70

34
36
76
125

34
36
34, 126
78
73
70
70
108
77
125
83
70, 72, 76

112
55
53
78
54
39
99
169
102
40

173

174

Rational Rose 2000 UML

19

97
97
97
47
80
134, 170

use case 59
119
113
118

35
29
28, 170
33
31
29
59
26
108, 170
23

23, 110, 170

Rational Unified Process 19


117
16

126

66

62
62
63

100
100
47, 98, 170
103
99, 169
99
91, 170

49
34, 170
86
59
51

80
80

59
61
59, 170
59
108

19
170
18, 121

Rational Unified Process 20


133, 170
15

43, 170
83, 131
113, 170

108
31


16, 170

54
106
51


65
126

19
30
169
23
26

19
50
170
53
26
19

124

175

Rational Rose 2000 UML







. .
. .
. .
. .
. .
. .
. .
. .

. .
. . . 11. 3000. .
, 105023, , . , . 2/8.
: www.dmkpress.ru, info@dmk.ru.

.
142300, . , . , 1.