Page 8 - Introduction to Programming with Java: A Problem Solving Approach
P. 8
9.5. Writing Your Own Utility Class 354
9.6. Using Class Members in Conjunction with
Instance Members 354
9.7. Problem Solving with Class Members and
Instance Members in a Linked List Class (Optional) 358
11.12. for Loop Header Details 457 11.13. GUI Track: Unicode (Optional) 459
12
10.9. Two-Dimensional Arrays 396
10.10. Arrays of Objects 402
10.11. The ArrayList ClAasspa409go PDF Enhancer
10.12. Storing Primitives in an ArrayList 414
10.13. ArrayList Example Using Anonymous
C H A P T E R
Contents vii
CHAPTER 10
Arrays and ArrayLists
370
Aggregation, Composition, and Inheritance 471
12.1. Introduction 472
12.2. Composition and Aggregation 472
12.3. Inheritance Overview 479
12.4. Implementation of Person/Employee/
FullTime Hierarchy 483
12.5. Constructors in a Subclass 485
12.6. Method Overriding 486
12.7. Using the Person/Employee/FullTime Hierarchy 488
12.8. The final Access Modifier 489
12.9. Using Inheritance with Aggregation and
Composition 490
12.10. Design Practice with Card Game
10.1. Introduction 371
10.2. Array Basics 371
10.3. Array Declaration and Creation 373
10.4. Array length Property and Partially
Filled Arrays 377
10.5. Copying an Array 379
10.6. Problem Solving with Array Case
Studies 382
10.7. Searching an Array 388
10.8. Sorting an Array 393
Example 493
12.11. Problem Solving with Association Classes
Objects and the For-Each Loop 417 10.14. ArrayLists Versus Standard
Arrays 422
CHAPTER 11
Type Details and Alternate Coding Mechanisms 433
11.1. Introduction 434
11.2. Integer Types and Floating-Point
Types 434
11.3. char Type and the ASCII
Character Set 438
11.4. Type Conversions 441
11.5. Prefix/Postfix Modes for Increment/Decrement
Operators 443
11.6. Embedded Assignments 446
11.7. Conditional Operator Expressions 448
11.8. Expression Evaluation Review 449
11.9. Short-Circuit Evaluation 453
11.10. Empty Statement 454
11.11. break Statement within a Loop 456
CHAPTER 13
Inheritance and Polymorphism 508
13.1. Introduction 509
13.2. The Object Class and Automatic Type
Promotion 509
13.3. The equals Method 510
13.4. The toString Method 514
13.5. Polymorphism and Dynamic Binding 519
13.6. Assignments Between Classes in a Class
Hierarchy 522
13.7. Polymorphism with Arrays 524
13.8. Abstract Methods and Classes 530
13.9. Interfaces 533
13.10. The protected Access Modifier 539
13.11. GUI Track: Three-Dimensional Graphics
(Optional) 544
CHAPTER 14 Exception Handling 555
(Optional) 498
14.1. 14.2.
Introduction 556
Overview of Exceptions and Exception Messages 556