, . , Company () Name (), Address () NumberOfEmployees ( ).
, . , . (attribute visibility).
. (. . 2.38). Employee Address Company:
Public (, ). , . . Company Address Employee. UML +.
Private (, ). . Employee Address , Company , . , Employee , . - UML.
Protected (). . , . , Employee HourlyEmp SalariedEmp. Address Employee, HourlyEmp SalariedEmp, Company. UML #.
. , . , .
. , .
. - . - . .
, - , , .
( , responsibilities). .
( ):
;
|
|
. ( ):
;
;
.
, . , . .
UML :
(1: 1, 2: 2,...): .
.
(implementor operations) (). UML.
(manager operations) . .
. , . (access operations).
(helper operations) , , . .
, .
.
, . ,
. () ().
- . . . , , .
, . :
;
(run time);
.
.
. , .
(association) . (. 2.39). .
. 2.39.
(aggregation) () ( ).
|
|
:
1) ;
2) ;
3) ;
4) .
:
(, , );
( 1 1, B1 1, 1 1);
() ( 1 1, A1 1 );
( 1 A1, Ai(i 1)).
, :
;
;
.
, , .
, , , . .
UML . UML . . . UML .
UML . . . , UML .
(. 2.40). (. 2.41).
. 2.40
2.41.
, ( ). , . , . , , . , .
. , .
. , , . , Person () Company () . , employs () (. . 2.39).
. , . .
, , (. 2.42). Person Company, , Person Company. , , . , , , . , , , .
|
|
2.42.
(multiplicity) , . , . - ( ). .
UML .
* | ||
0..* | ||
1..* | ||
0..1 | ||
1..1 | ||
, Course ( ) Student (). , . , 10 20 , (. 2.43).
2.43.
- (Association class), , . - , . - , , . - -.
, , Student Course, Grade (). , . Student, , . Course, .
, -. Grade, . UML - . 2.44.
2.44. -
- , -. . 2.44 , . , , - Grade , Student Course.
(dependency) , . ( ). , (. 2.45).
2.45.
, . : ; ; . , , , .
|
|
(generalization) - (inheritance). - . , . UML - - (. 2.46).
2.46.
, / .
, , .
2.5.
UML
UML [18] (Unified Modeling Language) , , , - , . UML .
UML - , 1980- 1990- . UML 1994 ., Booch (Object Modeling Technique) Rational Software. 1995 . , Unified Method, 0.8. 1995 . OOSE (Object-Oriented Software Engineering) . , UML , , . UML :
, ;
;
;
( , );
- ;
.
UML , OMG (Object Management Group) - , . UML (Microsoft, IBM, Hewlett-Packard, Oracle, Sybase .). , CASE-, IBM Rational
Software, UML (Together (Borland), Paradigm Plus (Computer Associates), System Architect (Popkin Software), Microsoft Visual Modeler .). UML http://www.omg.org http://www.rational.com.
UML 1.1, OMG 1997 ., :
(structural) :
(class diagrams) - ; (component diagrams) () ;
(deployment diagrams) .
(behavioral):
(use case diagrams) - ; (interaction diagrams):
(sequence diagrams) (collaboration diagrams) ;
(statechart diagrams) ;
(activity diagrams) , .
|
|
2.5.1.
(use case) 1986 . . . [19].
(), , ( ). . , , , .
(actor) , . , .
, , .
, , , . , - .
. . 2.47 .
. 2.47.
, , . : . , : , , , , PIN- .
. . , , , (stakeholders) . , . , . , , . .
. . , .
, . :
. . , .
. , . .
. , , .
. , , - . - , , , , . , , .
. . . , (flow of events). , . , .
, . - , , . :
;
(pre-conditions);
;
;
(post-conditions);
(extensions).
.
. , . , .
.
. - , , . , , . . , . . , , .
. . , . , , , . ( ), (subflow). ( ) . , :
1. , .
2. PIN-.
3. PIN-.
4. .
5. : , ,
6. .
7. , .
8. .
9. , .
10. .
11. .
12. .
13. .
14. .
1. PIN-.
41. , .
42. .
4. .
2. .
91. , .
92. .
9. .
3. .
91. , , .
92. . , , .
93. .
94. .
, , . . :
;
, ;
;
;
( , ).
, :
(, );
(, );
, (, );
(, 5 ).
. , . , - . . , . , , , . .
. , ( ). .
. (communication), (include), (extend) (generalization).
, ( ). , .
, - ( ), . . PIN- , . , .
( ), .
, . 2.48.
. 2.48.
, . , , (. 2.49).
. , . , .
. -
. 2.49.
, , .
. , , 10 - 20 ( ). , .
, :
;
;
;
;
;
( -, ).
2.5.2.
( ).
, . , .
(message) , - - .
(informative) , - .
- (interrogative) , -.
(imperative) , - .
: .
, . , , , , , PIN- . ( ) . 2.50.
; (Customer).
. 2.50.
, , . , .
. (lifeline) . .
. , . , , ; , , , (self-delegation) , , .
- . , .
, , . , , , , . , , (control objects). .
(. 2.51).
. , . . 2.51 , , . , , - . , .
. 2.51.
- . , .
, , , . , , .
2.5.3.
, . , , . . 2.52.
. 2.52.
: Card Reader ( ), Account (), ATM Screen ( ATM) Cash Dispenser ( ). . , Account ATM Screen, . Card Reader Cash Dispenser, . , . 2.5.8.
, , . . . . , , .
. -, ( ). , - , .. .
. , Security () , . Employee Maintenance ( ), Reporting ( ) Error Handling ( ). .
, , , . , (. 2.53) , . , , .. . .
. 2.53.
. 2.54.
() (. 2.54). ( ) ( , .. , ). . .
2.5.4.
, , . , .
. 2.55 . , . . , , . (event), .
. 2.55. Account
, . , , [ ] . (guard condition) , .
(start) (stop). , , . , . , , , . - , . . 2.55 . , , , (actions).
: , , , . Account .
(activity) , , . , , . . , , . , do () .
(entry action) , , . , , . , , , , , . .
, entry () .
(exit action) , . , Account , , . . , .
, exit () .
(transition) . , .
. , . , .
, , .
(event) . . .
, , . , RequestClosure().
, , , . , , . , , .
(guard conditions) , , . , . .
, .
. , , , , .
, . , .
, .
, . -, .
2.5.5.
UML , SDL . , . , , .
. , . , , .
. 2.56 , . .
(activity). , ( , , ). .
, . . , .
(object flow). . ( ) , .
. , .
. 2.56 . , , ,
. 2. 56.
.
() , . , . , , .
, , . , , .
. .
, , , .
:
. , , . ;
. , ( (swimlanes). , ).
2.5.6.
. 11 . : .
( ) . , .
. 2.57 .
. 2.57.
. C++. ( .h) ( .). , ATM Screen ATM Screen: . (package specification) ATM Screen. , . . (thread of processing) .
. , Card Reader ATM Screen. , , Card Reader , ATM Screen . ATMClient.exe.
, , . , Cash Dispenser, Card Reader ATM Screen. , Account. . 2.58.
. 2.58.
, , . .
, . , .
2.5.7.
. , .
, . , .
. :
(node) ( , ..). ;
(connection) ().
. 2.59.
, , , . . 2.59.
. . . . , , Oracle. , .
, , , .
2.5.8.
UML
UML , , . UML , IDEFO, IDEF1X, IDEF3, DFD ERM. ( ), . UML, ( ), . :
;
() ;
.
, . , (. . 2.52) ().
- , . , , (. . 4.3.2), : Boundary (), Entity () Control ().
(boundary classes) , . , , (, ) .
- (entity classes) () , , . - .
(control classes) . , .