| Classes | p. 1 |
| Chapter Objectives | p. 1 |
| Introduction | p. 1 |
| Principles of Object-Oriented Design | p. 2 |
| Methods, Classes, and Objects | p. 7 |
| An Example of the Use of Constructors for Stacks | p. 13 |
| A First Look at Exceptions and Exception Handlers | p. 16 |
| A First Look at Class Hierarchies and Inheritance | p. 22 |
| Generic Programming | p. 27 |
| Static Fields and Methods | p. 33 |
| An Abstraction for Complex Numbers | p. 39 |
| Suggested Improvements in the Design of the complex Interface | p. 43 |
| Chapter Summary | p. 46 |
| Inheritance and Polymorphism | p. 56 |
| Chapter Objectives | p. 56 |
| Introduction | p. 56 |
| Inheritance: Superclasses and Subclasses | p. 57 |
| Public, Private and Protected Access Modifiers | p. 61 |
| The Use of final Classes and Methods | p. 69 |
| Multiple Inheritance | p. 70 |
| Abstract Classes | p. 73 |
| Polymorphism | p. 79 |
| Implications of Inheritance and Polymorphism for Software Engineering | p. 83 |
| Chapter Summary | p. 86 |
| Search and Sort | p. 97 |
| Chapter Objectives | p. 97 |
| Introduction | p. 97 |
| The Concept of an Algorithm | p. 98 |
| Design With Classes and Objects | p. 99 |
| Efficiency Issues: Preliminary Discussion | p. 100 |
| The Principle of Finite Induction | p. 102 |
| Comparing Algorithms: Using "Big O" Notation | p. 102 |
| More on Generics: The Object Class and the Comparable Interface | p. 103 |
| Search Algorithms for Arrays: Linear (Sequential) Search | p. 105 |
| Analysis of Linear Search | p. 107 |
| Review of Recursive Programming | p. 108 |
| Binary Search | p. 111 |
| Analysis of Binary Search | p. 114 |
| Sorting Algorithms: Selection and Insertion Sort | p. 114 |
| Analyzing Selection and Insertion Sort | p. 117 |
| Quicksort and Recursive Algorithms | p. 118 |
| Analysis of Quicksort | p. 123 |
| Mergesort | p. 125 |
| Analysis of Mergesort | p. 130 |
| Chapter Summary | p. 131 |
| Hashing: Prelude to the java.util Library | p. 141 |
| Chapter Objectives | p. 141 |
| Introduction | p. 141 |
| Hashing as an Efficient Method of Data Storage and Retrieval | p. 141 |
| Choosing an Appropriate Hash Function | p. 145 |
| Strategies for Resolving Hash Collisions | p. 147 |
| Resolving Hash Collisions Using Buckets and Linked Lists | p. 152 |
| Implementations of Hashing Using Generic Classes in Java | p. 156 |
| Hashing in java.util | p. 163 |
| Chapter Summary | p. 170 |
| A General Overview of the java.util Library | p. 175 |
| Chapter Objectives | p. 175 |
| Introduction | p. 175 |
| The Java Collections Framework | p. 176 |
| The Collection and Iterator Interfaces | p. 177 |
| A First Look at Concrete Collection Classes: The List Interface and the LinkedList Implementation | p. 181 |
| The Set Interface and the HashSet Implementation | p. 187 |
| The SortedSet Interface and the TreeSet Implementation | p. 192 |
| The Map and SortedMap Interfaces and their Implementations | p. 195 |
| Legacy Collections | p. 206 |
| Algorithms and the Collections and Arrays Classes | p. 210 |
| Chapter Summary | p. 213 |
| Vectors and Lists | p. 223 |
| Chapter Objectives | p. 223 |
| Introduction | p. 223 |
| The Vector Class | p. 223 |
| An Application of the Vector Class | p. 233 |
| An Introduction to the List ADT and Its Implementations in java.util | p. 236 |
| An Application of Lists: The deque ADT | p. 246 |
| An Application of Deques: Sifting Random Numbers | p. 246 |
| Sorting Randomly Generated Odd and Even Positive Integers | p. 251 |
| Some Important Predefined List Methods | p. 254 |
| Chapter Summary | p. 259 |
| Stacks, Queues, and Priority Queues | p. 266 |
| Chapter Objectives | p. 266 |
| Introduction | p. 266 |
| The Stack Abstraction | p. 267 |
| Implementing Stacks Using the Stack Class | p. 268 |
| Implementing the Stack ADT as a Subclass of ArrayList | p. 272 |
| Implementing the Stack ADT as a Subclass of LinkedList | p. 276 |
| Applications of the Stack ADT | p. 278 |
| The Queue Abstraction | p. 296 |
| Implementing the Queue ADT | p. 297 |
| Applications of the Queue ADT | p. 303 |
| The PriorityQueue Abstraction | p. 316 |
| Implementing the PriorityQueue ADT | p. 318 |
| Applications of the PriorityQueue ADT | p. 320 |
| Chapter Summary | p. 329 |
| Generic Algorithms and the StringTokenizer Class | p. 334 |
| Chapter Objectives | p. 334 |
| Introduction | p. 334 |
| An Overview of Java's Generic Algorithms for the Collections Class | p. 335 |
| Generic Sorting Algorithms Applicable to List Objects | p. 335 |
| The shuffle Algorithm | p. 341 |
| The reverse Algorithm | p. 342 |
| The fill Algorithm | p. 343 |
| The copy Algorithm | p. 344 |
| Binary Search on Lists | p. 344 |
| The max and min Algorithms | p. 346 |
| The nCopies Algorithm | p. 348 |
| Singleton Algorithms | p. 349 |
| Predefined final static Fields in the Collections Hierarchy | p. 350 |
| The Arrays Utility Class | p. 351 |
| Moving between Arrays and Lists | p. 356 |
| Some Applications of Generic Algorithms | p. 358 |
| The StringTokenizer Utility Class | p. 359 |
| Chapter Summary | p. 366 |
| Sets and Maps | p. 373 |
| Chapter Objectives | p. 373 |
| Introduction | p. 373 |
| The Set Interface and the HashSet and TreeSet Implementations | p. 374 |
| Set Operations | p. 376 |
| The Methods of the SortedSet Interface | p. 380 |
| Implementation Details: Binary Search Trees and Red-Black Trees | p. 381 |
| The Map Interface and its HashMap and TreeMap Implementations | p. 390 |
| An Application of Maps to Prime Numbers: The Sieve of Eratosthenes | p. 391 |
| The Methods of the SortedMap Interface | p. 397 |
| A Commercial Application of Maps: Processing Employee Records | p. 399 |
| Sorting Using Nonlinear Structures: TreeSort and HeapSort | p. 401 |
| Chapter Summary | p. 408 |
| Graphs and Networks | p. 413 |
| Chapter Objectives | p. 413 |
| Introduction: Basic Ideas Concerning Graphs | p. 413 |
| Design Issues for Graph ADTs | p. 416 |
| Implementation Details of Graph ADTs in Java | p. 417 |
| Graph Traversals | p. 419 |
| Networks: Introductory Ideas | p. 421 |
| Basic Design Components for a Network ADT | p. 423 |
| Implementation Details for the Network Simulator | p. 427 |
| Description of a Typical Execution | p. 436 |
| Chapter Summary | p. 437 |
| Assertions and the assert Statement | p. 439 |
| Appendix Objectives | p. 439 |
| Introduction | p. 439 |
| Illustration of the Use of assert in Processing Stacks | p. 439 |
| Glossary | p. 441 |
| Index | p. 456 |
| Table of Contents provided by Ingram. All Rights Reserved. |