Page 7 - Introduction to Programming with Java: A Problem Solving Approach
P. 7

                vi
Contents
4.5. 4.6. 4.7. 4.8. 4.9. 4.10. 4.11.
4.12. 4.13. 4.14. 4.15.
|| Logical Operator
! Logical Operator
switch Statement 119
while Loop 123
do Loop 126
for Loop 127
Solving the Problem of Which Loop to Use 132
Nested Loops 133
boolean Variables 135
Input Validation 138
Problem Solving with Boolean Logic (Optional) 139
116 118
6.13. Problem Solving with Simulation (Optional) 227
7
Object-Oriented Programming— Additional Details 245
7.1. Introduction 246
7.2. Object Creation—A Detailed Analysis 246
7.3. Assigning a Reference 248
7.4. Testing Objects for Equality 252
7.5. Passing References as Arguments 257
7.6. Method-Call Chaining 260
7.7. Overloaded Methods 262
7.8. Constructors 265
7.9. Overloaded Constructors 272
7.10. Problem Solving with Multiple Driven Classes 275
8
Software Engineering 295
8.1. Introduction 296
CHAPTER
 CHAPTER
5
 Using Pre-Built Methods 151
5.1. Introduction 152
5.2. The API Library 153
5.3. Math Class 155
5.4. Wrapper Classes for Primitive Types
5.5. Character Class 165
5.6. String Methods 167
5.7. Formatted Output with the printf Method 172
5.8. Problem Solving with Random Numbers (Optional) 177
5.9. GUI Track: Drawing Images, Lines, Rectangles, and Ovals in Java Applets (Optional) 182
6
Object-Oriented Programming 195
CHAPTER
 CHAPTER
8.2. Coding-Style Conventions 296
8.3. Helper Methods 305
8.4. Encapsulation (With Instance
Variables and Local Variables) 308
8.5. Design Philosophy 310
8.6. Top-Down Design 312
8.7. Bottom-Up Design 321
8.8. Case-Based Design 323
8.9. Iterative Enhancement 324
8.10. Merging Driver Method into Driven Class 326
8.11. Accessing Instance Variables without Using this 327
8.12. Problem Solving with the API Calendar Class (Optional) 329
8.13. GUI Track: Problem Solving with CRC Cards (Optional) 331
6.7. Tracing an OOP Program
6.8. UML Class Diagrams 215
6.9. Local Variables 216
210
CHAPTER
206
161
Apago PDF Enhancer
 6.1. Introduction 196
6.2. Object-Oriented Programming Overview
6.3. First OOP Class 199
6.4. Driver Class 203
6.5. Calling Object, this Reference
6.6. Instance Variables 209
196
9
Classes with Class Members 345
9.1. Introduction 345
9.2. Class Variables 346 9.3. Class Methods 349 9.4. Named Constants 352
 6.10. The return Statement
6.11. Argument Passing 222
6.12. Specialized Methods—Accessors, Mutators,
Boolean Methods 224
218













   5   6   7   8   9