Introduction |
|
1 | (4) |
|
|
1 | (1) |
|
What's New in the Fifth Edition |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
Source Code Used in This Book |
|
|
4 | (1) |
|
1 Introduction to Object-Oriented Concepts |
|
|
5 | (28) |
|
|
5 | (1) |
|
Objects and Legacy Systems |
|
|
6 | (1) |
|
Procedural Versus OO Programming |
|
|
7 | (4) |
|
Moving from Procedural to Object-Oriented Development |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
What Exactly Is an Object? |
|
|
12 | (4) |
|
|
12 | (1) |
|
|
13 | (3) |
|
|
16 | (3) |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
19 | (1) |
|
Using Class Diagrams as a Visual Tool |
|
|
19 | (1) |
|
Encapsulation and Data Hiding |
|
|
20 | (3) |
|
|
20 | (1) |
|
|
21 | (1) |
|
A Real-World Example of the Interface/Implementation Paradigm |
|
|
21 | (1) |
|
A Model of the Interface/Implementation Paradigm |
|
|
22 | (1) |
|
|
23 | (4) |
|
Superclasses and Subclasses |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
27 | (3) |
|
|
30 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
31 | (2) |
|
2 How to Think in Terms of Objects |
|
|
33 | (14) |
|
Knowing the Difference Between the Interface and the Implementation |
|
|
34 | (7) |
|
|
36 | (1) |
|
|
36 | (1) |
|
An Interface/Implementation Example |
|
|
36 | (5) |
|
Using Abstract Thinking When Designing Interfaces |
|
|
41 | (1) |
|
Providing the Absolute Minimal User Interface Possible |
|
|
42 | (4) |
|
|
43 | (1) |
|
|
44 | (1) |
|
Environmental Constraints |
|
|
44 | (1) |
|
Identifying the Public Interfaces |
|
|
44 | (1) |
|
Identifying the Implementation |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
46 | (1) |
|
3 More Object-Oriented Concepts |
|
|
47 | (20) |
|
|
47 | (7) |
|
When Is a Constructor Called? |
|
|
48 | (1) |
|
What's Inside a Constructor? |
|
|
48 | (1) |
|
|
48 | (1) |
|
Using Multiple Constructors |
|
|
49 | (4) |
|
The Design of Constructors |
|
|
53 | (1) |
|
|
54 | (3) |
|
|
54 | (1) |
|
Checking for Problems and Aborting the Application |
|
|
54 | (1) |
|
Checking for Problems and Attempting to Recover |
|
|
54 | (1) |
|
|
55 | (2) |
|
|
57 | (6) |
|
|
58 | (1) |
|
|
59 | (2) |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (2) |
|
|
65 | (1) |
|
|
65 | (2) |
|
|
67 | (10) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
69 | (2) |
|
|
71 | (2) |
|
|
73 | (2) |
|
|
75 | (1) |
|
Private Implementation Methods |
|
|
76 | (1) |
|
|
76 | (1) |
|
|
76 | (1) |
|
5 Class Design Guidelines |
|
|
77 | (14) |
|
Modeling Real-World Systems |
|
|
77 | (1) |
|
Identifying the Public Interfaces |
|
|
78 | (2) |
|
The Minimum Public Interface |
|
|
78 | (1) |
|
Hiding the Implementation |
|
|
79 | (1) |
|
Designing Robust Constructors (and Perhaps Destructors) |
|
|
80 | (1) |
|
Designing Error Handling into a Class |
|
|
81 | (1) |
|
Documenting a Class and Using Comments |
|
|
81 | (1) |
|
Building Objects with the Intent to Cooperate |
|
|
82 | (1) |
|
Designing with Reuse in Mind |
|
|
82 | (1) |
|
Designing with Extensibility in Mind |
|
|
83 | (3) |
|
|
83 | (1) |
|
Abstracting Out Nonportable Code |
|
|
84 | (1) |
|
Providing a Way to Copy and Compare Objects |
|
|
84 | (1) |
|
Keeping the Scope as Small as Possible |
|
|
84 | (2) |
|
Designing with Maintainability in Mind |
|
|
86 | (2) |
|
Using Iteration in the Development Process |
|
|
86 | (1) |
|
|
86 | (2) |
|
|
88 | (2) |
|
Serializing and Marshaling Objects |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (14) |
|
|
91 | (6) |
|
Performing the Proper Analysis |
|
|
95 | (1) |
|
Developing a Statement of Work |
|
|
95 | (1) |
|
Gathering the Requirements |
|
|
95 | (1) |
|
Developing a System Prototype |
|
|
96 | (1) |
|
|
96 | (1) |
|
Determining the Responsibilities of Each Class |
|
|
96 | (1) |
|
Determining How the Classes Collaborate with Each Other |
|
|
96 | (1) |
|
Creating a Class Model to Describe the System |
|
|
96 | (1) |
|
Prototyping the User Interface in Code |
|
|
97 | (1) |
|
|
97 | (5) |
|
|
98 | (1) |
|
|
99 | (2) |
|
Wrapping Nonportable Code |
|
|
101 | (1) |
|
Wrapping Existing Classes |
|
|
101 | (1) |
|
|
102 | (1) |
|
|
103 | (2) |
|
7 Mastering Inheritance and Composition |
|
|
105 | (20) |
|
|
105 | (1) |
|
|
106 | (6) |
|
Generalization and Specialization |
|
|
109 | (1) |
|
|
110 | (2) |
|
|
112 | (3) |
|
Representing Composition with UML |
|
|
113 | (2) |
|
Why Encapsulation Is Fundamental to 00 |
|
|
115 | (8) |
|
How Inheritance Weakens Encapsulation |
|
|
115 | (2) |
|
A Detailed Example of Polymorphism |
|
|
117 | (1) |
|
|
118 | (3) |
|
Abstract Classes, Virtual Methods, and Protocols |
|
|
121 | (2) |
|
|
123 | (1) |
|
|
123 | (2) |
|
8 Frameworks and Reuse: Designing with Interfaces and Abstract Classes |
|
|
125 | (22) |
|
Code: To Reuse or Not to Reuse? |
|
|
125 | (1) |
|
|
126 | (2) |
|
|
128 | (11) |
|
|
128 | (3) |
|
|
131 | (2) |
|
|
133 | (2) |
|
|
135 | (1) |
|
|
136 | (2) |
|
|
138 | (1) |
|
|
139 | (7) |
|
|
139 | (1) |
|
|
139 | (2) |
|
|
141 | (1) |
|
|
142 | (4) |
|
|
146 | (1) |
|
|
146 | (1) |
|
9 Building Objects and Object-Oriented Design |
|
|
147 | (14) |
|
Composition Relationships |
|
|
148 | (1) |
|
|
149 | (2) |
|
|
151 | (3) |
|
|
151 | (1) |
|
|
152 | (1) |
|
Using Associations and Aggregations Together |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
155 | (4) |
|
Multiple Object Associations |
|
|
157 | (1) |
|
|
158 | (1) |
|
Tying It All Together: An Example |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (14) |
|
|
162 | (1) |
|
Smalltalk's Model/View/Controller |
|
|
163 | (1) |
|
|
164 | (9) |
|
|
165 | (4) |
|
|
169 | (2) |
|
|
171 | (2) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
11 Avoiding Dependencies and Highly Coupled Classes |
|
|
175 | (12) |
|
Composition versus Inheritance and Dependency Injection |
|
|
177 | (8) |
|
|
177 | (2) |
|
|
179 | (3) |
|
|
182 | (3) |
|
|
185 | (1) |
|
|
185 | (2) |
|
12 The SOLID Principles of Object-Oriented Design |
|
|
187 | (18) |
|
The SOLID Principles of Object-Oriented Design |
|
|
188 | (16) |
|
1) SRP: Single Responsibility Principle |
|
|
188 | (4) |
|
2) OCP: Open/Close Principle |
|
|
192 | (2) |
|
3) LSP: Liskov Substitution Principle |
|
|
194 | (3) |
|
4) IPS: Interface Segregation Principle |
|
|
197 | (1) |
|
5) DIP: Dependency Inversion Principle |
|
|
198 | (6) |
|
|
204 | (1) |
|
|
204 | (1) |
Index |
|
205 | |