Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://sp.cs.msu.ru/courses/ooap/umlpracticum2004.pdf
Äàòà èçìåíåíèÿ: Fri Sep 3 15:56:37 2004
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 21:53:23 2012
Êîäèðîâêà:
.. - UML Rational Rose


2


1. Rational Rose ................................................. 3 1.1 ...................................................................................................................... 3 1.2 Rose ....................................................................................... 5 1.3 ....................................................................................... 6 2. ........................................................................................... 8 2.1 - ......................................................................................... 8 2.2 .......................................................................... 8 2.3 - ......................................................................................... 12 2.4 C .......................................................................................... 13 2.5 ............................................................................................ 14 2.6 .......................................................................... 14 2.7 ........................................ 15 2.8 ............................................................... 17 2.9 ...................................................................................................................... 21 2.10 .................................................................................................... 37 2.11. ............................................................................................................ 53


3

1. Rational Rose
1.1 Rose - , , , (log). : · (browser) - · (documentation window) - · (toolbars) - · (diagram window) - UML · (log) - . 1.1 Rose. - , . , ­ , , , . : ­ ( , , , , ..) ­ ­ ­ ­ ­ ­ ­ ­ ­ (view): , , . . 1.2. . , . "-" , . "+" - . Rose. , . , , , . , Rose. Rose . : . , , . UML. . Tools > Options, Toolbars.


4

. 1.1 Rose. ( ): 1. Tools > Options. 2. Toolbars. 3. , ( ) Show Standard ToolBar ( Show Diagram ToolBar) : 1. . 2. Use Large Buttons ( ) : 1. . 2. Customize () 3. , Add () Remove (), . 1.2. ­ . : 1. . 2. Delete. 3. , , , . : 1. .


5 2. Edit > Delete from Model CTRL + D. , UML . Rose . , Rose . . . , , . , .

. 1.2. . 1.2 Rose Rose (views) - , , . . - . . 1.1 , Rose. , , . . . . : ­ . ­ . , , . ­ , , . ­ . ­ , . : ­ , . ­ .


­ ­ ­ ­ ­

6 , . Rose - . , . : , (threads), . , , . . , , . , , - . . 1.3

Rose , : ­ ­ ­ ­ ­ . ­ . ­ . , Tools > Options. : ­ . ­ . ­ . ­ . , , . . . . . : 1. . 2. , - . 3. Options > Show All Attributes. : 1. . 2. , - . 3. Options > Select Compartment Items. 4. Edit Compartment. : 1. . 2. , - . 3. Options > Suppress Attributes. : 1. Tools > Options. 2. Diagram. 3. Suppress Attributes Show All Attributes.


7 . . , . ­ . ­ . ­ . ­ . , : ­ . , , . ­ . , , . : 1. . 2. , - . 3. Options > Show All Operations. : 1. . 2. , - . 3. Options > Select Compartment Items. 4. Edit Compartment. : 1. . 2. , - . 3. Options > Suppress Operations. : 1. . 2. , - . 3. Options > Show Operation Signature. : 1. Tools > Options. 2. Diagram. 3. Suppress Operations, Show All Operations Show Operation Signatures. : 1. . 2. , - . 3. Options > Show Visibility. : 1. Tools > Options. 2. Diagram. 3. Show Visibility. Rose UML: 1. Tools > Options. 2. Notation. 3. Visibility as Icons. , Rose. , UML. . .


8

2.
2.1 - . , . , , , . , ( ). : , , . , ( ). 4 . 2 , - . 10 3 ( 3, ). , ( ). , , , . , . . 2.2 (business actors): · · · · ­ . ­ . ­ . ­ , .

1. Rational Rose Rational Rose Create New Model Rational Unified Process (. 2.1). Rose , . 1.1. : 1. Business Use Case Model Use Case View . 2. New > Actor 3. NewClass. UML. 4. , . 5. . 6. Open Specification. 7. Business Actor .


9 8. coursereg(analysis) File > Save.

. 2.1. : , (Business Use Case): · ; · ; · ; · . 2. Rational Rose : 1. Business Use Case Model Use Case View . 2. New > Use Case 3. NewUseCase . UML. 4. , . 5. . 6. Open Specification. 7. Business Use Case .


10 : - . . . 2.2.

. 2.2. . 3. : 1. Business Use Case Model Use Case View . 2. New > Use Case Diagram. 3. , (Business Use Case Diagram). 4. , . 5. , . 6. Unidirectional Association ( ) .


11 4. 1. « ». 2. : « Business Use Case . , ». 3. MS Word « ». Business Use Case « »: : . : Business Use Case . , . : 1. . 2. , ( ). « »: 1. . 2. 4 2 . 3. . 4. « ». « »: 1. . 2. . 3. , . 4. . 5. « ». « »: 1. ( ), . 2. . . : , : « » , , ( 10 ), ( ), , . : , , . :


12 , , . 5. 1. 2. 3. 4. . Open Specification Files. Insert File. 5. Open, . 2.3 - : 1. ­ , , , , . : 2. 3. 4. 5. 6. . . ( ) ( ). ( ).

6. , - « », , - 1. Business Object Model Logical View . 2. New > Class. NewClass . 3. «». 4. . 5. Open Specification. 6. Business Worker . 7. - Business Entity. 8. Object Model Logical View . 9. New > Package 10. Business Use-Case Realizations. 11. Business Use-Case Realizations « » ( «business use-case realization», ). 12. . 13. New > Class Diagram. 14. VOPC. 15. . 2.3. -, Business Use Case « », . 2.3 (


13 - label. : 1. ­ Tools > Options > Diagram > Stereotype Display. 2. ­ Options > Stereotype Display. 3. ­ Format > Stereotype Display.

. 2.3. - 2.4 C - . , . , , , . - . , ( ). . , . , , . , ( ).


14 4 . , 2 , - . 10 3 ( 3, ). , . , . , , , . , . . , . , , , , . , . 2.5 . . (Course Offering) (Report Card) (Roster) (Schedule) , ( ). . , . . , . . , . , . , . , .

2.6 ­ , . . , , , , , , , . . , , , . Windows 95/98-.


15 24 7 , ­ 10%. 2000 , 500 , . , , , . . . , . 2.7 : · · · ­ , , , , . ­ . ­ , .

7. Rational Rose : 1. Use Case Model Use Case View . 2. New > Actor 3. NewClass. UML. 4. , . : : · ; · ; · ; · ; · ; · ; · ; · . ,

. 2.4.


16

. 2.4. 8. Rational Rose : 1. Use Case Model Use Case View . 2. New > Use Case 3. NewUseCase . UML. 4. , . :


17 . . . 2.4. Rose . (Main) . , . : 1. "+", . 2. Main, . , [Use Case Diagram: Use Case view / Main]. : 1. . 2. New > Use Case Diagram. 3. , . 4. , . 9. 1. Main. 2. , . 3. Unidirectional Association ( ) . 2.8 , . . . 2.5. , , «» () « », , . : · · · · · ­ . ­ . ­ , , . ­ . ­ , .

: · · · · · ; ; ; ;


18 · · · ; ; .

. 2.5. 10. 1. « ». 2. : « ».


19 3. MS Word « », « » « ». « »: : . : , . 1. . 2. . 3. , . : /: , / , . , . : . : , . . « »: : . ( ), . . : , . 1. ( , , ). 2. , (, , ). : 1. . 2. 4 2 . 3. . 4. « ». : 1. . 2. . 3. , .


20 4. . 5. « ». : 1. . 2. . 3. . 4. . , , . : , «» ( ), . . . : : . « » : 1. «» «». 2. . , : « » , , , , . , , , . : « » « » , . , , . : , , . , , . : , , . : « » , , . : . : , , . . « »: : . , ( ),


21 . , . : , . 1. . , . 2. , - . , , . 3. ; , . . , . 4. . - ( , .3), . 5. . . : : , , . . : , . , . : . : , . . 11. 1. 2. 3. 4. . Open Specification . Insert File. 5. Open, .

2.9 2.9.1 : · () ; · ( );


22 · · ( ); .

: · ; · ; · ; · (). : · . · , , , . · . · . · , , . · , , Analysis Model. · , , , , «use-case realization». Use Case Realizations. (. 2.6).

. 2.6. ( ) ( , ). ERM. , : · Student (); · Professor (); · Schedule ( ); · Course (); · CourseOffering ( ).


23 . 2.7.

. 2.7. 12. Traceabilities: 1. Design Model . 2. New > Package. 3. Use-Case Realizations, ­ Use-Case Realization Close Registration, Use-Case Realization ­ Login Use-Case Realization - Register for Courses. 4. Use-Case Realization Close Registration, Login Register for Courses ( «use-case realization», ). 5. Use-Case Realizations Traceabilities . 2.8. Key Abstractions: 1. Analysis Model. 2. New > Class. NewClass . 3. Student. 4. Professor, Schedule, Course CourseOffering. 5. Analysis Model. 6. New > Class Diagram. 7. Key Abstractions. 8. , . . 2.7. ( Design Model) <>. .


24 ( ) (Application Business Services).

. 2.8 Traceabilities 2.9.2 ,

: 1. (Boundary) ­ . , « - » . : ( , - , , ), ( , ). 2. - (Entity) ­ () . -: , , , .


25 3. (Control) ­ . , . , . : , , . , « », . 2.9.

. 2.9. , « » 13. , Register for Courses, «View Of Participating Classes» (VOPC) 1. Analysis Model. 2. New > Class. NewClass . 3. RegisterForCoursesForm. 4. RegisterForCoursesForm. 5. Open Specification. 6. Boundary . 7. CourseCatalogSystem Boundary RegistrationController Control. 8. Schedule, CourseOffering Student Entity. 9. Register for Courses Use-Case Realization - Register for Courses. 10. New > Class Diagram. 11. VOPC (classes only). 12. . 2.9. , ,


26 ( ). ( ), . . : · · · (, ). 14. Register for Courses. , . 2.10 ­ 2.14.

. 2.10 Register for Courses - Basic Flow


27

. 2.11 Register for Courses - Basic Flow (Create Schedule) 1. Tools > Options. 2. . 3. Sequence Numbering, Collaboration Numbering , Focus of Control ­ . 4. , . 1. Register for Courses Use-Case Realization - Register for Courses. 2. New > Sequence Diagram. 3. Register for Courses - Basic Flow. 4. , . , 1. «» . 2. RegisterForCoursesForm RegistrationController . 3. Object Message ( ). 4. «» RegisterForCoursesForm. 5. , : // register for courses.


28 6. 3 ­ 5, , . 2.10 ( 3 Message to Self).

. 2.12 Register for Courses - Basic Flow (Update Schedule) 1. 1, // register for courses. 2. . . 3. - // register for courses. 4. , . 5. 1 ­ 4, . , . 2.11 ­ 2.14. , . 2.14 PrimarySheduleOfferingInfo (-, Shedule OfferingInfo), .


29

. 2.13 Register for Courses - Basic Flow (Delete Schedule) : 1. Note. 2. , . 3. , . 4. , Anchor Notes To Item ( ). 5. , , . . 6. - ( . 2.7 ), ( ) . , . , , . : 1. Text Box. 2. , . 3. , .


30

. 2.14 Register for Courses - Basic Flow (Submit Schedule) F5. (responsibilities), (responsibility) ­ , . . «», ( ). , VOPC (classes only) (. 2.9) 8 (. 2.15):


31

. 2.15 VOPC (classes only) "" , , . 15. 1. Tools > Options. 2. Diagram. 3. , Show All Attributes .


32 4. , Suppress Attributes Suppress Operations . 1. 2. 3. 4. 5. 6. Student. New Attribute. address Enter. 1 ­ 4, name studentID. CourseOffering Shedule, . 2.16.

. 2.16 "" () : 1. . ( ), ( ), . , . 2. -. , , , -.


33 16. , Register for Courses. Register for Courses Use-Case Realization - Register for Courses (. 2.17 ­ 2.19).

. 2.17 Entity Classes (-) . 2.17 -. Student Schedule , , . , , . Schedule CourseOffering , ( ) ( ). Student ­ FulltimeStudent ( ) ParttimeStudent ( ). . 2.18 -, Schedule CourseOffering. , , ­ (status), « », «», « » « ». , «» (grade). , PrimaryScheduleOfferingInfo - ScheduleOfferingInfo ( , , , ) ( ), . . 2.19 « » ( ). , - , () , , ( ).


34 , ( ) .

. 2.18 CourseOfferingInfo ( -) . -, . : 1. Association. 2. . : 1. , . 2. Navigable. : 1. Association. 2. - . 3. . 4. .


35

. 2.19. VOPC ( ) 1. Aggregation . 2. - . : 1. Aggregation. 2. - . 3. . 4. . . , , . , , .


36 : 1. Generalization . 2. . , , . : 1. . 2. Multiplicity. 3. . 4. . : 1. . 2. . : 1. . 2. role Name. 3. . ( ): 1. . 2. Detail. 3. Link Element. Close Registration . 2.10 - ( «»), , . - : · ; · . 2.10.1 : · · · · · , ; , ; ; ; .

(design classes). :


37 , ; · , . , : · : , ; · : , , ; · : ; · : , . : · , (, ); · , ; · : , , (), . : · <>; · , , ­ <>; · : o , ; o , ; o (, , , , ); o , , <>; · - <>, ; , . ( ) CourseCatalogSystem, CourseCatalogSystem. () CourseCatalogSystem ( , ), . 2.20 ­ 2.23. DBCourseOfferring CourseOfferringList JDBC. . 2.23 CourseCatalogSystem Client CloseRegistrationController, RegistrationController, , . ·


38

. 2.20 CourseCatalogSystem

. 2.21. CourseCatalogSystem


39

. 2.22. CourseCatalogSystem . . , ( <>). , , , . , : · ; · ( ); · ( , , , , .); · ; · . . 2.24.


40

. 2.23. , getCourseOfferings , : · ( <>); · Application Registration, ; · BillingSystem CourseCatalogSystem ; · Business Services, , : External System Interfaces ( <>), University Artifacts ­ -. 2.10.2 : · (node) - ( , ; · (connection) - . ( ..). ().

: ( ) (. 2.25).


41

. 2.24. : · ( - , «» , «» , (peer-to-peer) ..); · ; · ; · ; · . . 2.26.


42

. 2.25

. 2.26


43 17. , Deployment View ( ) . : 1. Processor. 2. , . 3. . , . (, UNIX ). - . , , . (scheduling) , : · Preemptive ( ). . · Non preemptive ( ). . , . · Cyclic (). . , . · Executive (). , . · Manual (). . : 1. . 2. General. 3. Stereotype. : 1. . 2. Detail. 3. . 4. . : 1. . 2. Show Scheduling. : 1. Connection. 2. . 3. . : 1. . 2. General. 3. Stereotype (). : 1. . 2. New > Process. 3. . : 1. . 2. Show Processes.


44 2.10.3 , . , , , . - . . , , . , , , . , ( , ..). , , . , . : operationName(parameter:class,...):returnType. , . : public, private, protected. (scope) : . () : · , (): attributeName:Type = Default; · , ; · : public, private, protected; · () .

. 2.27 Student 18. Student


45 , : 1. . 2. Open Specification. 3. . 4. Initial Field ( ) . 5. Export Control : Public, Protected, Private Implementation. Private. : 1. Tools > Options. 2. Notation. 3. Visibility as Icons, Rose, , UML. . . , : 1. . 2. . 3. . 4. . 5. Export Control : Public, Protected, Private Implementation. public. : 1. . 2. Detail. 3. , Insert. 4. . 5. Data type . 6. , default . , . , - . , , ( ) . , , . . , , CourseOffering. : 1. . . , CourseOffering Open ( ) , 10, 10, Closed ( ). , CourseOffering Unassigned ( , .., - Professor) Assigned ( ).


46 2. . , , . , CourseOffering « » ­ addProfessor removeProfessor, ( ) ( ). - addProfessor removeProfessor. 3. . . , Unassigned Assigned (. 2.28).

. 2.28. CourseOffering , . 2.29. , (composite state) (history state). Open Closed, ­ Unassigned, Assigned, Cancelled ( ), Full ( ) Committed ( ). , , . ( «») ­ , . Open , (Unassigned Assigned) Open, , Open (add student remove student) , .


47

. 2.29. 19. CourseOffering : 1. . 2. New > Statechart Diagram. : 1. State 2. , . Detail . : 1. . 2. Detail. 3. Actions. 4. Insert. 5. . 6. Actions. 7. When Do, . , When On Entry.


48 , When On Exit. : 1. . 2. Detail. 3. Actions. 4. Insert. 5. . 6. Send Event. 7. (event), (arguments) (Target). : 1. Transition . 2. , . 3. , . : 1. Transition to Self . 2. , . , , : 1. , . 2. General. 3. Event. 4. Arguments. 5. Condition. 6. Action. : 1. , . 2. Detail. 3. Send Event. 4. Send Arguments. 5. Send Target. : 1. Start State End State. 2. , . (, ) . · , . , . · , . · , , . « », . 2.30. . Student Schedule . Schedule CourseOffering :


49 , - , .

. 2.30. . , , .., Student . . , , . 2.31. : 1. , ( .2.30 ­ Schedule). 2. Containment. 3. By Value. . By Value , , . (By Reference) , .


50

. 2.31. 2.10.4 Data Modeler. . «-» SQL. 20. : ­ : 1. . 2. Data Modeler > New > Database. 3. DB_0 Target Oracle 8.x. (persistent) : 1. Student University Artifacts. 2. Detail. 3. Persistence Persistent. 4. Classification, FulltimeClassification ParttimeClassification. 5. Student , "+". 6. studentID.


51 7. Data Modeler > Part of Object Identity ( ). : 1. University Artifacts. 2. Data Modeler > Transform to Data Model. 3. Target Database DB_0 . Schemas. 4. Schemas <> S_0. 5. Data Modeler > New > Data Model Diagram. 6. , «-» NewDiagram -, <> S_0. . 2.32.

. 2.32. «-»


52 SQL: 1. <> S_0. 2. Data Modeler > Forward Engi 3. Forward Engineering Wizard 4. DDL Next. 5. Next. 6. . 2.11. 2.7.1 Rational Rose . , . 21. ++ Student . : 1. . 2. Package Specification. 3. . 4. Student ++. 5. Package Body. 6. . 7. Student ++. 8. Dependency. 9. .
Student

neer. Next.

Student

. 2.33.


53 : 1. Student. 2. Student . Student Student. 2.11.2 : 1. . 2. . 3. , . 4. . : 1. Tools > Check Model. 2. . , , , , , . Check Model . Access Violations , , , . : 1. Report > Show Access Violations. 2. . , , . . Rose . . Tools > Options, . , , . . . , Tools > Options, , . , , .. . (C++, Java, ...) . , , . , . . , . . . . , , . Rose "" (skeletal) : ­ . .


54 . , , . ­ . , . ­ . . ­ . . ­ 22. ++. 1. 2. 3. 4. 5. . . Tools > C++ > Code Generation . . ( Tools > C++ > Browse Header Tools > C++ > Browse Body).