1 Introduction to UML 1
1.1Models and modelling 1
1.2Methodologies 5
1.3The unified Modeling Language 7
1.4Design models and code 10
1.5The software development process 12
1.6Summary 13
1.7Exercises 13
2.1The object model 15
2 Modelling with Objects 15
2.2Objects 17
2.3Objects properties 19
2.4Avoiding data replication 21
2.5Links 21
2.6Message passing 25
2.7Polymorphism 27
2.8Dynamic binding 30
2.9Class diagrams 31
2.10The applicability of the object model 33
2.11Summary 34
2.12Exercises 35
3 Diagram Editor : Use Case View 38
3.1 Statement of requirements 38
3.2 The use case view 40
3.3 Creating new diagrams 43
3.4 Use case realization 44
3.5 Creating new elements 46
3.6 Selecting elements 51
3.7 Deleting elements 54
3.8 Moving and resizinge lements 55
3.9 Use case extension 58
3.10 Use case diagrams 60
3.11 Summary 61
3.12 Exercises 62
4 Diagram Editor: Design View 65
4.1 The role of the design view 65
4.2 Classes and associations 66
4.3 Generalization 70
4.4 Creation tools 72
4.5 Selection tools 73
4.6 Features of classes 75
4.7 Complete class diagram 76
4.8 Dynamic modelling of the diagram editor 77
4.9 A statechart for creation tools 79
4.10 A statechart for selection tools 82
4.11 Statecharts of other classes 84
4.12 Summary 85
4.13 Exercises 85
5 Diagram Editor: Implementation View 88
5.1 Application frameworks 88
5.2 The applet framework 92
5.3 Implementation of classes 96
5.4 Implementation of associations 98
5.5 Implementation of statecharts 102
5.6 Managing tools 105
5.7 The document/view architecture 106
5.8 Summary 108
5.9 Exercises 109
6 Class Diagrams 111
6.1 Primitive notions 112
6.2 Classes 114
6.3 Describing objects with classes 115
6.4 Associations 119
6.5 The need for generalization 125
6.6 Generalization and specialization 126
6.7 Inheritance of attributes and operations 129
6.8 Association generalization 133
6.9 Aggregation 135
6.10 Composite objects 138
6.11 Association classes 140
6.12 Qualified associations 144
6.13 Multiple inheritance 146
6.14 Summary 150
6.15 Exercises 152
7.1 Collaborations 160
7 Interaction Diagrams 160
7.2 Classifier roles 162
7.3 Association roles 163
7.4 Transient links 163
7.5 Interaction diagrams 164
7.6 Object creation 168
7.7 Object destruction 169
7.8 Iterated messages 170
7.9 Multiobjects 171
7.10 Conditional messages 173
7.11 Messages of self 176
7.12 Summary 177
7.13 Exercises 178
8 Statecharts 180
8.1 State-dependent behaviour 181
8.2 States,events and transitions 182
8.3 Initial and final states 183
8.4 Guard conditions 184
8.5 Actions 186
8.6 Activities 188
8.7 Composite states 190
8.8 History states 193
8.9 Summary of the CD player 194
8.10 Dynamic modelling in practice 195
8.11 Time events 200
8.12 Activity states 200
8.13 Summary of the ticket machine 201
8.14 Summary 201
8.15 Exercises 203
9 Constraints 207
9.1 Standard constraints 208
9.2 The Object Constraint Language 209
9.3 The context of a constraint 210
9.4 Navigation expressions 211
9.5 Objects and collections 214
9.6 Constraints 218
9.7 Stereotyped constraints 221
9.8 Constraints and generalization 223
9.9 Summary 224
9.10 Exercises 225
10 Implementation Strategies 227
10.1 Implementing associations 228
10.2 Unidirectional implementations 229
10.3 Bidirectional implementations 232
10.4 Implementing qualifiers 238
10.5 Implementing associations as classes 240
10.6 Implementing constraints 242
10.7 Implementing statecharts 243
10.8 Persitency 247
10.9 Interfacing to databases 249
10.10 Summary 252
10.11 Exercises 253
11 Design pragmatics 254
11.1 Physical design 255
11.2 Interfaces 260
11.3 Reverse engineering 261
11.4 Templates 264
11.5 Optimization of design models 265
11.6 Summary 270
11.7 Exercises 271
12 Principles and Patterns 272
12.1 The open-closed principle 273
12.2 No concrete superclasses 277
12.3 Decouple the interface hierarchy 279
12.4 The Liskov substitution principle 281
12.5 Interactions determine structure 282
12.6 Design patterns 284
12.7 Recursive structures 286
12.8 The State and Strategy pattems 290
12.9 MVC, document/view and Observer 291
12.10 Applying Visitor to the stock control program 294
12.11 Summary 298
12.12 Exercises 298
13 Cab Dispatching System 300
13.1 Use cases 300
13.2 handing immediate jobs 301
13.3 Handing prebooked jobs 307
13.4 Allocating a cab to a job 309
13.5 Job confirmation 312
13.6 Cancelling a job 315
13.7 Progression of jobs 316
13.8 Completing the static model 317
13.9 Implementation overview 318
13.10 Summary 321
13.11 Exercises 322
A Summary of Notation Used 323
A.1 Common notations 323
A.2 Use case diagrams 325
A.3 Object diagrams 326
A.4 Collaborations 326
A.5 Sequence diagrams 327
A.6 Collaboration diagrams 328
A.7 Class diagrams 329
A.8 Statechart diagrams 331
A.9 Component diagrams 332
A.10 Templates 332
References 334
Index 336