Amazing Books
Temporary Blank

Monday, November 8, 2010

Mastering UML with Rational Rose 2002












Table of Contents
Mastering UML with Rational Rose 2002........................................................................................................1
Chapter 1: Introduction to UML.......................................................................................................................4
Introduction to the Object−Oriented Paradigm.......................................................................................4
Encapsulation.............................................................................................................................5
Inheritance.................................................................................................................................6
Polymorphism............................................................................................................................8
What Is Visual Modeling?......................................................................................................................8
Systems of Graphical Notation................................................................................................................9
Booch Notation........................................................................................................................10
Object Management Technology (OMT).................................................................................10
Unified Modeling Language (UML)........................................................................................11
Understanding UML Diagrams..............................................................................................................12
Business Use Case Diagrams....................................................................................................13
Use Case Diagrams...................................................................................................................14
Activity Diagrams.....................................................................................................................14
Sequence Diagrams...................................................................................................................16
Collaboration Diagrams............................................................................................................17
Class Diagrams........................................................................................................................17
Statechart Diagrams..................................................................................................................18
Component Diagrams...............................................................................................................19
Deployment Diagrams..............................................................................................................21
Visual Modeling and the Software Development Process.....................................................................22
Inception..................................................................................................................................24
Elaboration...............................................................................................................................24
Construction.............................................................................................................................25
Transition.................................................................................................................................26
Summary...............................................................................................................................................26
Chapter 2: A Tour of Rose..............................................................................................................................27
What Is Rose?.......................................................................................................................................27
Getting Around in Rose.........................................................................................................................30
Parts of the Screen....................................................................................................................31
Exploring Four Views in a Rose Model................................................................................................38
Use Case View..........................................................................................................................38
Logical View............................................................................................................................40
Component View......................................................................................................................42
Deployment View.....................................................................................................................43
Working with Rose...............................................................................................................................45
Creating Models........................................................................................................................45
Saving Models.........................................................................................................................46
Exporting and Impoting Models..............................................................................................47
Publishing Models to the Web..................................................................................................48
Working with Controlled Units................................................................................................50
Using the Model Integrator.......................................................................................................52
Working with Notes..................................................................................................................53
Working with Packages............................................................................................................54
Adding Files and URLs to Rose Model Elements....................................................................56
Adding and Deleting Diagrams................................................................................................56
Setting Global Options..........................................................................................................................57
Working with Fonts..................................................................................................................58
Working with Colors................................................................................................................58
Chapter 2: A Tour of Rose
Summary...............................................................................................................................................59
Chapter 3: Business Modeling........................................................................................................................61
Introduction to Business Modeling........................................................................................................61
Why Model the Business?........................................................................................................61
Do I Need to Do Business Modeling?......................................................................................62
Business Modeling in an Iterative Process...............................................................................63
Business−Modeling Concepts................................................................................................................66
Business Actors.........................................................................................................................66
Business Workers.....................................................................................................................67
Business Use Cases...................................................................................................................68
Business Use Case Diagrams....................................................................................................69
Activity Diagrams.....................................................................................................................70
Business Entities.......................................................................................................................72
Organization Unit.....................................................................................................................73
Where Do I Start?.................................................................................................................................74
Identifying the Business Actors................................................................................................74
Identifying the Business Workers.............................................................................................75
Identifying the Business Use Cases..........................................................................................76
Showing the Interactions..........................................................................................................76
Documenting the Details..........................................................................................................77
Creating Business Use Case Diagrams..................................................................................................78
Deleting Business Use Case Diagrams.....................................................................................79
The Use Case Diagram Toolbar................................................................................................80
Adding Business Use Cases......................................................................................................80
Business Use Case Specifications.............................................................................................81
Assigning a Priority to a Business Use Case............................................................................83
Viewing Diagrams for a Business Use Case............................................................................83
Viewing Relationships for a Business Use Case......................................................................86
Working with Business Actors..............................................................................................................87
Adding Business Actors............................................................................................................87
Adding Actor Specifications.....................................................................................................88
Assigning an Actor Stereotype.................................................................................................89
Setting Business Actor Multiplicity..........................................................................................89
Viewing Relationships for a Business Actor............................................................................90
Working with Relationships..................................................................................................................91
Association Relationship..........................................................................................................91
Generalization Relationship......................................................................................................92
Working with Organization Units..........................................................................................................94
Adding Organization Units.......................................................................................................94
Deleting Organization Units.....................................................................................................95
Activity Diagrams.................................................................................................................................95
Adding an Activity Diagram.....................................................................................................96
Adding Details to an Activity Diagram....................................................................................97
Summary.............................................................................................................................................102
Chapter 4: Use Cases and Actors..................................................................................................................104
Use Case Modeling Concepts..............................................................................................................104
Actors.....................................................................................................................................104
Use Cases...............................................................................................................................105
Traceability............................................................................................................................107
Flow of Events........................................................................................................................108
Relationships..........................................................................................................................114
Use Case Diagrams.............................................................................................................................118
Activity Diagrams...............................................................................................................................119
Activity..................................................................................................................................120
Start and End States................................................................................................................121
Objects and Object Flows.......................................................................................................121
Transitions.............................................................................................................................122
Synchronization.....................................................................................................................122
Working with Use Cases in Rational Rose..........................................................................................123
The Use Case Diagram Toolbar..............................................................................................123
Creating Use Case Diagrams..................................................................................................124
Deleting Use Case Diagrams..................................................................................................126
Adding Use Cases...................................................................................................................127
Deleting Use Cases.................................................................................................................129
Use Case Specifications..........................................................................................................130
Naming a Use Case.................................................................................................................131
Viewing Participants of a Use Case........................................................................................132
Assigning a Use Case Stereotype...........................................................................................132
Assigning a Priority to a Use Case.........................................................................................133
Creating an Abstract Use Case...............................................................................................133
Viewing Diagrams for a Use Case..........................................................................................134
Viewing Relationships for a Use Case...................................................................................136
Working with Actors...........................................................................................................................137
Adding Actors.........................................................................................................................137
Deleting Actors.......................................................................................................................139
Actor Specifications................................................................................................................139
Naming Actors........................................................................................................................141
Assigning an Actor Stereotype...............................................................................................142
Setting Actor Multiplicity.......................................................................................................142
Creating an Abstract Actor.....................................................................................................143
Viewing Relationships for an Actor.......................................................................................144
Viewing an Actor's Instances..................................................................................................145
Working with Relationships................................................................................................................145
Association Relationship........................................................................................................145
Includes Relationship..............................................................................................................146
Extends Relationship..............................................................................................................148
Generalization Relationship....................................................................................................148
Working with Activity Diagrams.........................................................................................................149
The Activity Diagram Toolbar...............................................................................................149
Creating Activity Diagrams....................................................................................................150
Deleting Activity Diagrams....................................................................................................154
Exercise...............................................................................................................................................154
Problem Statement..................................................................................................................154
Create a Use Case Diagram....................................................................................................154
Summary.............................................................................................................................................157
Chapter 5: Object Interaction......................................................................................................................159
Interaction Diagrams...........................................................................................................................159
What Is an Object?..................................................................................................................161
What Is a Class?......................................................................................................................161
Where Do I Start?...................................................................................................................162
Finding Objects.......................................................................................................................162
Finding the Actor....................................................................................................................163
Using Interaction Diagrams....................................................................................................164
Sequence Diagrams.............................................................................................................................164
The Sequence Diagram Toolbar.............................................................................................165
Collaboration Diagrams.......................................................................................................................166
The Collaboration Diagram Toolbar.......................................................................................167
Working with Actors on an Interaction Diagram................................................................................167
Working with Objects.........................................................................................................................168
Adding Objects to an Interaction Diagram.............................................................................168
Deleting Objects from an Interaction Diagram.......................................................................169
Setting Object Specifications..................................................................................................169
Naming an Object...................................................................................................................170
Mapping an Object to a Class.................................................................................................171
Setting Object Persistence......................................................................................................173
Using Multiple Instances of an Object...................................................................................174
Working with Messages.......................................................................................................................175
Adding Messages to an Interaction Diagram..........................................................................175
Adding Messages to a Sequence Diagram..............................................................................175
Deleting Messages from a Sequence Diagram.......................................................................176
Reordering Messages in a Sequence Diagram........................................................................176
Message Numbering in a Sequence Diagram.........................................................................177
Viewing the Focus of Control in a Sequence Diagram..........................................................178
Adding Messages to a Collaboration Diagram.......................................................................179
Deleting Messages from a Collaboration Diagram.................................................................180
Message Numbering in a Collaboration Diagram..................................................................181
Adding Data Flows to a Collaboration Diagram....................................................................181
Setting Message Specifications..............................................................................................182
Naming a Message..................................................................................................................182
Mapping a Message to an Operation......................................................................................183
Setting Message Synchronization Options.............................................................................185
Setting Message Frequency....................................................................................................188
End of a Lifeline.................................................................................................................................189
Working with Scripts..........................................................................................................................189
Switching Between Sequence and Collaboration Diagrams................................................................191
Two−Pass Approach to Interaction Diagrams.....................................................................................192
Exercise...............................................................................................................................................195
Problem Statement..................................................................................................................195
Create Interaction Diagrams...................................................................................................195
Summary.............................................................................................................................................200
Chapter 6: Classes and Packages..................................................................................................................201
Logical View of a Rose Model............................................................................................................201
Class Diagrams...................................................................................................................................201
What Is a Class?......................................................................................................................202
Finding Classes.......................................................................................................................203
Creating Class Diagrams........................................................................................................205
Deleting Class Diagrams........................................................................................................207
Organizing Items on a Class Diagram....................................................................................207
Using the Class Diagram Toolbar...........................................................................................208
Working with Classes.........................................................................................................................209
Adding Classes.......................................................................................................................209
Class Stereotypes................................................................................................................................212
Analysis Stereotypes...............................................................................................................212
Class Types............................................................................................................................217
Interfaces................................................................................................................................224
Web Modeling Stereotypes.....................................................................................................225
Other Language Stereotypes...................................................................................................228
Class Specifications............................................................................................................................230
Naming a Class.......................................................................................................................231
Setting Class Visibility...........................................................................................................232
Setting Class Multiplicity.......................................................................................................233
Setting Storage Requirements for a Class...............................................................................234
Setting Class Persistence........................................................................................................234
Setting Class Concurrency......................................................................................................235
Creating an Abstract Class......................................................................................................235
Viewing Class Attributes........................................................................................................236
Viewing Class Operations......................................................................................................236
Viewing Class Relationships..................................................................................................237
Using Nested Classes..............................................................................................................237
Viewing the Interaction Diagrams That Contain a Class.......................................................238
Setting Java Class Specifications............................................................................................239
Setting CORBA Class Specifications.....................................................................................241
Working with Packages.......................................................................................................................242
Adding Packages.....................................................................................................................242
Deleting Packages...................................................................................................................243
Exercise...............................................................................................................................................244
Problem Statement..................................................................................................................244
Creating a Class Diagram.......................................................................................................244
Summary.............................................................................................................................................250
Chapter 7: Attributes and Operations..........................................................................................................251
Working with Attributes.....................................................................................................................251
Finding Attributes...................................................................................................................251
Adding Attributes...................................................................................................................252
Deleting Attributes..................................................................................................................255
Setting Attribute Specifications..............................................................................................256
Setting the Attribute Containment..........................................................................................264
Making an Attribute Static......................................................................................................265
Specifying a Derived Attribute...............................................................................................265
Working with Operations.....................................................................................................................266
Finding Operations.................................................................................................................267
Adding Operations..................................................................................................................268
Deleting Operations................................................................................................................271
Setting Operation Specifications............................................................................................272
Adding Arguments to an Operation........................................................................................278
Specifying the Operation Protocol..........................................................................................279
Specifying the Operation Qualifications.................................................................................280
Specifying the Operation Exceptions.....................................................................................281
Specifying the Operation Size................................................................................................281
Specifying the Operation Time...............................................................................................281
Specifying the Operation Concurrency...................................................................................282
Specifying the Operation Preconditions.................................................................................282
Specifying the Operation Postconditions................................................................................283
Specifying the Operation Semantics.......................................................................................284
Displaying Attributes and Operations on Class Diagrams..................................................................285
Showing Attributes.................................................................................................................286
Showing Operations................................................................................................................288
Showing Visibility..................................................................................................................290
Showing Stereotypes...............................................................................................................291
Mapping Operations to Messages........................................................................................................292
Mapping an Operation to a Message on an Interaction Diagram...........................................294
Exercise...............................................................................................................................................295
Problem Statement..................................................................................................................295
Add Attributes and Operations...............................................................................................296
Summary.............................................................................................................................................300
Chapter 8: Relationships...............................................................................................................................301
Relationships.......................................................................................................................................301
Types of Relationships............................................................................................................301
Finding Relationships.............................................................................................................303
Associations........................................................................................................................................304
Using Web Association Stereotypes.......................................................................................306
Creating Associations.............................................................................................................307
Deleting Associations.............................................................................................................310
Dependencies......................................................................................................................................311
Creating Dependencies...........................................................................................................313
Deleting Dependencies...........................................................................................................314
Package Dependencies........................................................................................................................315
Creating Package Dependencies.............................................................................................316
Deleting Package Dependencies.............................................................................................317
Aggregations.......................................................................................................................................317
Creating Aggregations............................................................................................................318
Deleting Aggregations............................................................................................................320
Generalizations...................................................................................................................................321
Creating Generalizations.........................................................................................................322
Deleting Generalizations.........................................................................................................323
Working with Relationships................................................................................................................324
Setting Multiplicity.................................................................................................................324
Using Relationship Names......................................................................................................326
Using Stereotypes...................................................................................................................327
Using Roles............................................................................................................................328
Setting Export Control............................................................................................................330
Using Static Relationships......................................................................................................331
Using Friend Relationships.....................................................................................................332
Setting Containment...............................................................................................................333
Using Qualifiers.....................................................................................................................334
Using Link Elements..............................................................................................................335
Using Constraints....................................................................................................................336
Exercise...............................................................................................................................................338
Problem Statement..................................................................................................................338
Adding Relationships..............................................................................................................338
Summary.............................................................................................................................................340
Chapter 9: Object Behavior..........................................................................................................................341
Statechart Diagrams............................................................................................................................341
Creating a Statechart Diagram................................................................................................342
Adding States.........................................................................................................................343
Adding State Details...............................................................................................................344
Adding Transitions.................................................................................................................349
Adding Transition Details.......................................................................................................350
Adding Special States.............................................................................................................352
Using Nested States and State History...................................................................................353
Exercise...............................................................................................................................................355
Problem Statement..................................................................................................................355
Create a Statechart Diagram...................................................................................................356
Summary.............................................................................................................................................359
Chapter 10: Component View.......................................................................................................................360
What Is a Component?........................................................................................................................360
Types of Components.............................................................................................................360
Component Diagrams.........................................................................................................................362
Creating Component Diagrams..............................................................................................363
Adding Components...............................................................................................................364
Adding Component Details....................................................................................................367
Adding Component Dependencies.........................................................................................372
Exercise...............................................................................................................................................373
Problem Statement..................................................................................................................373
Summary.............................................................................................................................................380
Chapter 11: Deployment View.......................................................................................................................381
Deployment Diagrams........................................................................................................................381
Opening the Deployment Diagram.........................................................................................381
Adding Processors..................................................................................................................382
Adding Processor Details........................................................................................................384
Adding Devices.......................................................................................................................387
Adding Device Details............................................................................................................389
Adding Connections...............................................................................................................391
Adding Connection Details.....................................................................................................392
Adding Processes....................................................................................................................394
Exercise...............................................................................................................................................397
Problem Statement..................................................................................................................397
Create Deployment Diagram..................................................................................................397
Summary.............................................................................................................................................400
Chapter 12: Introduction to Code Generation and Reverse Engineering Using Rational Rose.............401
Preparing for Code Generation............................................................................................................401
Step One: Check the Model....................................................................................................402
Step Two: Create Components...............................................................................................404
Step Three: Map Classes to Components...............................................................................405
Step Four: Set the Code−Generation Properties.....................................................................406
Step Five: Select a Class, Component, or Package.................................................................409
Step Six: Generate Code.........................................................................................................409
What Gets Generated?........................................................................................................................410
Introduction to Reverse Engineering Using Rational Rose.................................................................411
Model Elements Created During Reverse Engineering.......................................................................412
Round−Trip Engineering....................................................................................................................415
Summary.............................................................................................................................................415
Chapter 13: ANSI C++ and Visual C++ Code Generation and Reverse Engineering.............................417
Generating Code in ANSI C++ and Visual C++.................................................................................417
Converting a C++ Model to an ANSI C++ Model..............................................................................418
ANSI C++ Code−Generation Properties.............................................................................................419
Class Properties......................................................................................................................420
Attribute Properties.................................................................................................................421
Operation Properties...............................................................................................................422
Package (Class Category) Properties......................................................................................424
Component (Module Specification) Properties......................................................................424
Role Properties.......................................................................................................................427
Generalization Properties........................................................................................................428
Visual C++ Code−Generation Properties............................................................................................428
Class Model Assistant.............................................................................................................428
Component Properties.............................................................................................................431
Project Properties....................................................................................................................433
Visual C++ and ATL Objects.................................................................................................434
Generated Code...................................................................................................................................435
Code Generated for Classes....................................................................................................435
Code Generated for Attributes................................................................................................439
Code Generated for Operations..............................................................................................441
Visual C++ Code Generation...............................................................................................................443
Reverse Engineering ANSI C++..........................................................................................................443
Reverse Engineering Visual C++........................................................................................................445
Summary.............................................................................................................................................445
Chapter 14: Java Code Generation and Reverse Engineering...................................................................447
Overview.............................................................................................................................................447
Introduction to Rose J..........................................................................................................................448
Beginning a Java Project......................................................................................................................449
Selecting a Java Framework...................................................................................................449
Linking to IBM VisualAge for Java.......................................................................................450
Linking to Microsoft Visual J++............................................................................................451
Java Code−Generation Properties........................................................................................................451
Project Properties....................................................................................................................452
Class Properties......................................................................................................................456
Attribute Properties.................................................................................................................458
Operation Properties...............................................................................................................459
Module Properties...................................................................................................................460
Role Properties.......................................................................................................................461
Generating Code.................................................................................................................................462
Generated Code...................................................................................................................................462
Classes...................................................................................................................................463
Attributes...............................................................................................................................465
Operations..............................................................................................................................466
Bidirectional Associations......................................................................................................468
Unidirectional Associations....................................................................................................471
Associations with a Multiplicity of One to Many...................................................................472
Associations with a Multiplicity of Many to Many................................................................474
Reflexive Associations...........................................................................................................476
Aggregations..........................................................................................................................476
Dependency Relationships......................................................................................................478
Generalization Relationships..................................................................................................479
Interfaces................................................................................................................................480
Java Beans..............................................................................................................................481
Support for J2EE.................................................................................................................................484
EJBs.......................................................................................................................................484
Servlets...................................................................................................................................487
JAR and WAR Files...............................................................................................................488
Automated J2EE Deployment................................................................................................489
Reverse Engineering...........................................................................................................................490
Summary.............................................................................................................................................491
Chapter 15: Visual Basic Code Generation and Reverse Engineering......................................................493
Starting a Visual Basic Project............................................................................................................494
Visual Basic Code−Generation Properties..........................................................................................494
Class Properties......................................................................................................................495
Attribute Properties.................................................................................................................498
Operation Properties...............................................................................................................499
Module Specification Properties.............................................................................................502
Role Properties.......................................................................................................................503
Generalization Properties........................................................................................................504
Using the Code−Generation Wizard....................................................................................................505
Generated Code...................................................................................................................................509
Classes...................................................................................................................................509
Attributes...............................................................................................................................530
Operations..............................................................................................................................531
Bidirectional Associations......................................................................................................531
Unidirectional Associations....................................................................................................533
Associations with a Multiplicity of One to Many...................................................................534
Associations with a Multiplicity of Many to Many................................................................534
Reflexive Associations...........................................................................................................535
Aggregations..........................................................................................................................535
Dependency Relationships......................................................................................................536
Generalization Relationships..................................................................................................536
Reverse Engineering...........................................................................................................................537
Summary.............................................................................................................................................539
Chapter 16: XML DTD Code Generation and Reverse Engineering........................................................541
Overview.............................................................................................................................................541
Introduction to XML DTD...................................................................................................................542
Elements.................................................................................................................................542
Attributes...............................................................................................................................543
Entities and Notations.............................................................................................................543
DTD−to−UML Mapping.....................................................................................................................545
DTD Code−Generation Properties.......................................................................................................546
Project Properties....................................................................................................................546
Class Properties......................................................................................................................547
Attribute Properties.................................................................................................................551
Role Properties.......................................................................................................................552
Component Properties.............................................................................................................553
Generating Code.................................................................................................................................554
Generated Code...................................................................................................................................554
Classes...................................................................................................................................555
Attributes...............................................................................................................................562
Reverse Engineering DTD...................................................................................................................564
Summary.............................................................................................................................................565
Chapter 17: CORBA/IDL Code Generation and Reverse Engineering....................................................567
CORBA/IDL Code−Generation Properties.........................................................................................567
Project Properties....................................................................................................................568
Class Properties......................................................................................................................570
Attribute Properties.................................................................................................................575
Operation Properties...............................................................................................................576
Module Properties...................................................................................................................578
Association (Role) Properties.................................................................................................579
Dependency Properties...........................................................................................................580
Generated Code...................................................................................................................................581
Classes...................................................................................................................................581
Attributes...............................................................................................................................588
Operations..............................................................................................................................591
Bidirectional Associations......................................................................................................591
Unidirectional Associations....................................................................................................595
Associations with a Multiplicity of One to Many...................................................................595
Associations with a Multiplicity of Many to Many................................................................599
Associations with Bounded Multiplicity................................................................................600
Reflexive Associations...........................................................................................................602
Aggregations..........................................................................................................................604
Dependency Relationships......................................................................................................604
Generalization Relationships..................................................................................................605
Reverse Engineering CORBA Source Code...........................................................................608
Summary.............................................................................................................................................609
Chapter 18: Rose Data Modeler....................................................................................................................610
Object Models and Data Models..........................................................................................................610
Creating a Data Model.........................................................................................................................612
Logic in a Data Model.........................................................................................................................613
Adding a Database..............................................................................................................................614
Adding Tablespaces................................................................................................................615
Adding a Schema................................................................................................................................621
Creating a Data Model Diagram.............................................................................................622
Creating Domain Packages and Domains............................................................................................623
Adding Tables.....................................................................................................................................626
Adding Columns.....................................................................................................................628
Setting a Primary Key.............................................................................................................631
Adding Constraints.................................................................................................................631
Adding Triggers......................................................................................................................633
Adding Indexes.......................................................................................................................635
Adding Stored Procedures...................................................................................................................636
Adding Relationships..........................................................................................................................639
Adding Referential Integrity Rules.........................................................................................642
Working with Views...........................................................................................................................644
Generating an Object Model from a Data Model................................................................................648
Generating a Data Model from an Object Model................................................................................649
Generating a Database from a Data Model..........................................................................................651
Updating an Existing Database............................................................................................................653
Reverse Engineering a Database..........................................................................................................655
Summary.............................................................................................................................................656
Chapter 19: Web Modeling...........................................................................................................................657
Modeling a Web Application...............................................................................................................657
Web Class Stereotypes............................................................................................................659
Relationships..........................................................................................................................666
Reverse Engineering a Web Application.............................................................................................668
Generating Code for a Web Application.............................................................................................670
Summary.............................................................................................................................................671
Appendix: Getting Started with UML..........................................................................................................672
Building a Business Use Case Diagram...............................................................................................672
Building a Workflow (Activity) Diagram............................................................................................675
Building a Use Case Diagram..............................................................................................................679
Building an Interaction Diagram.........................................................................................................684
Building a Class Diagram....................................................................................................................688
Web Modeling....................................................................................................................................691
Adding Class Relationships.................................................................................................................694
Building a Statechart Diagram.............................................................................................................696
Building a Component Diagram..........................................................................................................699
Building a Deployment Diagram.........................................................................................................701


Download

Another Software Engineering Books

No comments:

Post a Comment

Related Posts with Thumbnails
There was an error in this gadget

Put Your Ads Here!
There was an error in this gadget