OOP Demystified
C
C language, 191
C#
assemblies, 207208
class definitions in, 247250
development of, 192, 204205
garbage collection, 206207
generics, 207
implementing interfaces in, 178179
multiple inheritance, 207
performance, 205
portability, 206
reusable code, 205
security, 205
templates, 207
user interface, 207
C++
classes, 241246
compiled code, 195
development of, 192
encapsulation, 3440
functions, 12
garbage collection, 196
and interfaces, 180181
level inheritance using, 7679
main function, 19
multiple inheritance, 8284, 196
performance, 193195
polymorphism using, 5153
portability, 196
reusable code, 192
security, 196
simple inheritance using, 6973
templates, 196198
user interface, 196
case diagrams, 152154
case modeling, 149150
change cases, 162
Class Responsibility Collaborator (CRC), 147148
See also collaboration
classes
abstract, 5657, 90
actor, 160
base, 33, 56, 63
body, 13
business, 160
in C++, 241246
combining with a program, 1920
constructors, 236
declaring an instance of a class, 2024
defined, 10, 12, 87
defining from designs, 160
defining methods with a class definition, 18
definition, 13, 108
derived, 33, 56, 63, 88
diagrams, 108, 109
enums inside classes, 244245
extends keyword, 234
fields and member functions, 234235
finalizers, 237
GradStudent, 40
hierarchy, 6369, 108, 109 , 127128
implements keyword, 234
before an interface is defined, 174178
interfaces vs., 170171
in Java, 233240
keyword, 13
main(), 142
methods in Java, 235236
modifiers in Java, 233, 234235
names , 13
size , 21
static and nonstatic initializers, 237
subclasses, 33, 63, 88
super, 33, 43, 63, 8788
ultimate base classes, 185187
user interface, 160
clients , 163
Cloneable interface, 183
collaboration, 124
association, 146
Class Responsibility Collaborator (CRC), 147148
defined, 133135
and inheritance, 145
messages, 144145
OOP, 135148
self-collaboration, 146147
UML collaboration diagrams, 143145
Collection interface, 183
COM, 156
Common Language Runtime (CLR), 204205
Common Object Request and Brokering Architecture, 156
compiled code, C++, 195
compiler errors, 9497
Component Object Model, 156
components , 181182
constructors, 236
in C++, 242243
initializing an instance variable, 22
See also copy constructors
copy constructors
in C++, 243244
See also constructors
CORBA, 156
CRC, 147148
Категории