| < Day Day Up > |
|
Abstract classes, 341–344
Employee Modeling program, 349
interfaces vs., 344
Accessor methods, 372
ActionListener, 210–212
Activation record, definition, 409
Active objects, 69
definition, 409
designing, 69, 71
gas station simulation, 81
Activity
asynchronous, See Asynchronous activities
definition, 7, 409
synchronous, 7–8, 412
Ada
exception blocks, 161
rendezvous concept, 17
specification, 375
Adapters, 278, 283, 285
definition, 409
further reading, 301
Aggregation, 338–340
immutable classes and thread safety, 376
Algorithms, generic reuse, 305
Amphibious Vehicle Design programs, 352, 353
Animation, 182–183
definition, 409
further reading, 222
Animator, 181–183
ball and square classes, 312–315
classification implementation using encapsulation, 325
classification vs. composition, 327–328
control panel implementation, 189–193, 287–298
Animator Class program, 295–296
Concurrent Ball program, 297–298, 326–327
controller interface, 288, 290
ControllerImp class program, 290–292
ControlPanel class program, 293–294
corrected repaint, 292, 296, 298
designing the controller, 298–300
GUI threads, 298–299
improved control panel, 193, 205–206
proper controller, 262
simple speed controller, 189–193
state diagram, 300
cooperative synchronization, 231–248, See also Cooperative synchronization
Drawable interface, 213
DrawEvent, 213–215, 289
DrawListener, 213–214, 325, 327–328
example with race condition, 243–248
gas station simulation, 251–259
generic implementation, 193–197
applications, 207
class program, 216–220
constructor, 215
deadlock, 209
Drawable interface, 197–201, 206
DrawEventMulticaster, 222–227
Graphics object, 214
Java Event Model, 210, 213–215
minimalist design approach, 206–208
MoveObjects program, 220–222
multiple threads and method synchronization, 204–205
notification object implementation, 251–253
program using, 202–204
race condition, 208–210
repaint event generation, 204–205
sleepTime, 206
source code, 194–199
vector class extension, 201, 204
vector cloning, 215, 219
GUI thread, 204–205, 208–209, 231
JPanel, 188, 327
Path Class programs, 183, 184
path interface, 184–186
reuse, 308–328
by classification, 316–320
by composition, 321–323
by copy, 308–309
method, 311–312
simple implementation, 186–189
GUI thread, 189, 192–193
paint method, 188–189, 192
source code, 186–187
speed controller, 189–193
synchronized run method program, 238–239
thread animation program with no coordination, 233–234
vector extension and JEM definition, 325–328
ArithmeticException, 163, 172, 176
Arrays, 115–118
bounded buffers, 70–71
collection classes, 118–119
objects, 116–118
vector classes, 119
Association, 339–340
final classes and, 376
Asynchronous activities, 8
concurrency definition and, 9, 11
definition of, 409
synchronization of, 9–11
threads, 21, See Threads
AWTEventMulticaster, 222
| < Day Day Up > |
|