|
|
1 | (68) |
|
|
2 | (6) |
|
Goals of Quality Software |
|
|
4 | (2) |
|
Specification: Understanding the Problem |
|
|
6 | (2) |
|
|
8 | (22) |
|
|
9 | (5) |
|
|
14 | (16) |
|
Verification of Software Correctness |
|
|
30 | (39) |
|
|
33 | (3) |
|
|
36 | (5) |
|
|
41 | (5) |
|
Testing Java Data Structures |
|
|
46 | (13) |
|
|
59 | (1) |
|
|
60 | (2) |
|
Summary of Classes and Support Files |
|
|
62 | (2) |
|
|
64 | (5) |
|
Data Design and Implementation |
|
|
69 | (70) |
|
|
70 | (9) |
|
|
70 | (1) |
|
|
71 | (3) |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
75 | (4) |
|
|
79 | (19) |
|
|
80 | (1) |
|
|
81 | (7) |
|
|
88 | (2) |
|
|
90 | (2) |
|
|
92 | (6) |
|
|
98 | (41) |
|
Using Classes in Our Programs |
|
|
100 | (3) |
|
|
103 | (3) |
|
|
106 | (12) |
|
|
118 | (13) |
|
|
131 | (2) |
|
Summary of Classes and Support Files |
|
|
133 | (1) |
|
|
133 | (6) |
|
ADTs Unsorted List and Sorted List |
|
|
139 | (110) |
|
|
140 | (1) |
|
Abstract Data Type Unsorted List |
|
|
141 | (21) |
|
|
141 | (5) |
|
|
146 | (1) |
|
|
147 | (15) |
|
|
162 | (7) |
|
Relationship between Unsorted and Sorted Lists |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
164 | (2) |
|
Extending the Abstract Class |
|
|
166 | (3) |
|
Abstract Data Type Sorted List |
|
|
169 | (12) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (11) |
|
|
181 | (8) |
|
|
183 | (1) |
|
Common Orders of Magnitude |
|
|
184 | (5) |
|
Comparison of Unsorted and Sorted List ADT Algorithms |
|
|
189 | (4) |
|
|
189 | (1) |
|
|
190 | (3) |
|
|
193 | (56) |
|
|
193 | (1) |
|
|
194 | (2) |
|
A Generic Abstract List Class |
|
|
196 | (4) |
|
A Generic Sorted List ADT |
|
|
200 | (4) |
|
|
204 | (1) |
|
|
205 | (1) |
|
Case Study: Real Estate Listings |
|
|
206 | (31) |
|
|
237 | (1) |
|
Summary of Classes and Support Files |
|
|
238 | (3) |
|
|
241 | (8) |
|
|
249 | (92) |
|
Formal ADT Specifications |
|
|
250 | (5) |
|
|
255 | (26) |
|
|
255 | (9) |
|
|
264 | (8) |
|
|
272 | (9) |
|
The Java Collections Framework |
|
|
281 | (5) |
|
Properties of Collections Framework Classes |
|
|
281 | (1) |
|
|
282 | (1) |
|
Java 2 Collections Framework Interfaces |
|
|
283 | (1) |
|
The AbstractCollection Class |
|
|
284 | (1) |
|
|
285 | (1) |
|
|
286 | (55) |
|
|
286 | (3) |
|
|
289 | (8) |
|
|
297 | (7) |
|
Case Study: Postfix Expression Evaluator |
|
|
304 | (21) |
|
|
325 | (1) |
|
Summary of Classes and Support Files |
|
|
325 | (2) |
|
|
327 | (14) |
|
|
341 | (64) |
|
Implementing a Stack as a Linked Structure |
|
|
342 | (14) |
|
Self Referential Structures |
|
|
342 | (5) |
|
|
347 | (1) |
|
|
348 | (2) |
|
|
350 | (3) |
|
The Other Stack Operations |
|
|
353 | (2) |
|
Comparing Stack Implementations |
|
|
355 | (1) |
|
Implementing a Queue as a Linked Structure |
|
|
356 | (10) |
|
|
358 | (2) |
|
|
360 | (2) |
|
|
362 | (1) |
|
A Circular Linked Queue Design |
|
|
363 | (1) |
|
Comparing Queue Implementations |
|
|
364 | (2) |
|
An Abstract Linked List Class |
|
|
366 | (14) |
|
|
366 | (3) |
|
|
369 | (11) |
|
Implementing the Unsorted List as a Linked Structure |
|
|
380 | (6) |
|
Comparing Unsorted List Implementations |
|
|
384 | (2) |
|
Implementing the Sorted List as a Linked Structure |
|
|
386 | (9) |
|
Comparing Sorted List Implementations |
|
|
394 | (1) |
|
|
395 | (10) |
|
|
398 | (1) |
|
Summary of Classes and Support Files |
|
|
398 | (1) |
|
|
399 | (6) |
|
|
405 | (70) |
|
|
406 | (11) |
|
The CircularSortedLinkedList Class |
|
|
407 | (2) |
|
|
409 | (1) |
|
|
410 | (1) |
|
Deleting from a Circular List |
|
|
411 | (2) |
|
|
413 | (4) |
|
|
417 | (1) |
|
|
417 | (5) |
|
The Insert and Delete Operations |
|
|
418 | (2) |
|
|
420 | (2) |
|
Linked Lists with Headers and Trailers |
|
|
422 | (1) |
|
A Linked List as an Array of Nodes |
|
|
423 | (11) |
|
|
423 | (2) |
|
|
425 | (9) |
|
|
434 | (41) |
|
|
434 | (2) |
|
|
436 | (5) |
|
Case Study: Large Integers |
|
|
441 | (21) |
|
|
462 | (1) |
|
Summary of Classes and Support Files |
|
|
462 | (3) |
|
|
465 | (10) |
|
Programming with Recursion |
|
|
475 | (54) |
|
|
476 | (4) |
|
A Classic Example of Recursion |
|
|
477 | (3) |
|
|
480 | (3) |
|
Coding the Factorial Function |
|
|
480 | (2) |
|
Comparison to the Iterative Solution |
|
|
482 | (1) |
|
Verifying Recursive Methods |
|
|
483 | (1) |
|
The Three-Question Method |
|
|
483 | (1) |
|
Writing Recursive Methods |
|
|
484 | (4) |
|
A Recursive Version of is There |
|
|
485 | (3) |
|
Debugging Recursive Methods |
|
|
488 | (1) |
|
Using Recursion to Simplify Solutions-Two Examples |
|
|
488 | (8) |
|
|
489 | (2) |
|
|
491 | (5) |
|
A Recursive Version of Binary Search |
|
|
496 | (2) |
|
Recursive Linked-List Processing |
|
|
498 | (7) |
|
|
498 | (3) |
|
|
501 | (4) |
|
|
505 | (9) |
|
Static Storage Allocation |
|
|
505 | (3) |
|
Dynamic Storage Allocation |
|
|
508 | (6) |
|
|
514 | (4) |
|
|
514 | (2) |
|
|
516 | (2) |
|
Deciding Whether to Use a Recursive Solution |
|
|
518 | (11) |
|
|
520 | (1) |
|
Summary of Classes and Support Files |
|
|
521 | (1) |
|
|
522 | (7) |
|
|
529 | (82) |
|
|
530 | (8) |
|
|
532 | (2) |
|
|
534 | (2) |
|
|
536 | (2) |
|
|
538 | (4) |
|
|
538 | (2) |
|
The Binary Search Tree Specification |
|
|
540 | (2) |
|
|
542 | (2) |
|
|
543 | (1) |
|
The Implementation Level-Declarations and Simple Operations |
|
|
544 | (2) |
|
Iterative Versus Recursive Method Implementations |
|
|
546 | (7) |
|
|
546 | (4) |
|
|
550 | (2) |
|
|
552 | (1) |
|
The Implementation Level-More Operations |
|
|
553 | (21) |
|
The isThere and retrieve Operations |
|
|
553 | (3) |
|
|
556 | (6) |
|
|
562 | (6) |
|
|
568 | (4) |
|
Testing Binary Search Tree Operations |
|
|
572 | (2) |
|
Comparing Binary Search Trees to Linear Lists |
|
|
574 | (2) |
|
|
574 | (2) |
|
Balancing a Binary Search Tree |
|
|
576 | (5) |
|
A Nonlinked Representation of Binary Trees |
|
|
581 | (30) |
|
Case Study: Word Frequency Generator |
|
|
585 | (12) |
|
|
597 | (1) |
|
Summary of Classes and Support Files |
|
|
597 | (1) |
|
|
598 | (13) |
|
Priority Queues, Heaps, and Graphs |
|
|
611 | (62) |
|
|
612 | (3) |
|
|
612 | (2) |
|
|
614 | (1) |
|
|
614 | (1) |
|
|
615 | (14) |
|
|
619 | (2) |
|
|
621 | (3) |
|
|
624 | (4) |
|
Heaps Versus Other Representations of Priority Queues |
|
|
628 | (1) |
|
|
629 | (25) |
|
|
633 | (2) |
|
|
635 | (12) |
|
|
647 | (7) |
|
Storing Objects/Structures in Files |
|
|
654 | (19) |
|
Saving Object Data in Text Files |
|
|
655 | (3) |
|
Saving Structures in Text Files |
|
|
658 | (2) |
|
|
660 | (3) |
|
|
663 | (1) |
|
Summary of Classes and Support Files |
|
|
663 | (2) |
|
|
665 | (8) |
|
Sorting and Searching Algorithms |
|
|
673 | (76) |
|
|
674 | (3) |
|
|
675 | (2) |
|
|
677 | (12) |
|
|
678 | (4) |
|
|
682 | (5) |
|
|
687 | (2) |
|
|
689 | (21) |
|
|
690 | (8) |
|
|
698 | (6) |
|
|
704 | (6) |
|
More Sorting Considerations |
|
|
710 | (10) |
|
|
710 | (1) |
|
|
710 | (2) |
|
|
712 | (8) |
|
|
720 | (3) |
|
|
721 | (1) |
|
|
722 | (1) |
|
|
722 | (1) |
|
|
723 | (1) |
|
|
723 | (26) |
|
|
727 | (7) |
|
Choosing a Good Hash Function |
|
|
734 | (4) |
|
|
738 | (1) |
|
|
738 | (1) |
|
Summary of Classes and Support Files |
|
|
739 | (1) |
|
|
740 | (9) |
Appendix A Java Reserved Words |
|
749 | (1) |
Appendix B Operator Precedence |
|
750 | (1) |
Appendix C Primitive Data Types |
|
751 | (1) |
Appendix D ASCII Subset of Unicode |
|
752 | (1) |
Answers to Selected Exercises |
|
753 | (40) |
Index |
|
793 | |