(
Chapters include: Introduction, Summary, Study Aid: Terminology Review, Questions for Review, Further Exercises, and GUI Supplement.)
1. Jumping Into Java. Section 1.1: Computers and programs.
Section 1.2: Programs and models.
Section 1.3: Objects, Behavior and Classes.
Section 1.4: Our First Object A Monitor.
Section 1.5: Sending a Message to the System.out Object.
Section 1.6: A Java program Java Interlude: Identifiers.
Section 1.7: Mechanics.
Section 1.8: Time.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Introduction.
2. Using Objects. Section 2.1: Introduction.
Section 2.2: Using PrintStream Objects.
Section 2.3: Java Interlude: References, Methods and Messages.
Section 2.4: The String Class.
Section 2.5: Methods, arguments and return-values.
Section 2.6: Reference Variables.
Java Interlude: Variables and Assignment.
Section 2.7: Using String Methods.
Java Interlude.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Web Pages and HTML.
3. Using Classes. Section 3.1: Introduction.
Section 3.2: Creating Objects.
Java Interlude.
Section 3.3: Disk Files.
Section 3.4: Writing Output to Files.
Section 3.5: Input: an overview.
Section 3.6: Input: The Keyboard.
Section 3.7: Interactive Input/Output.
Section 3.8: Input: Disk Files.
Section 3.9: Network Computing: An Introduction.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Applets.
4. Defining Classes. Section 4.1: Introduction.
Section 4.2: Class Definitions.
Section 4.3: Designing Classes: Specifying an InteractiveIO Class.
Section 4.4: Implementing the InteractiveIO Class.
Section 4.5: Improve the implementation but don't touch the interface!
Java Interlude: variables, declarations and the return statement.
Section 4.6: Specifying a None Class.
Section 4.7: Implementing the None Class.
Section 4.8: State and Behavior.
Section 4.9: Outputting Objects: Revisiting the Name Class (1).
Section 4.10: Inputting Objects: Revisiting the Name Class (2).
Section 4.11: Our First Program Revisited.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Applets, Painting and Creating Controls.
5. The Class Design Process Method Implementation and Numerical. Processing.
Section 5.1: Introduction.
Section 5.2: Designing Classes: An Overview.
Section 5.3: Numeric Processing: The int data type.
Section 5.4: Collecting Tolls: An Example.
Java Interlude: primitive data types, int, expressions and operators.
Another Java Interlude: int methods and int input.
Section 5.5: Other Integer Types.
Section 5.6: Modeling the Numbers of Measurement.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Drawing Text.
6. Controlling Behavior-Conditional Execution. Section 6.1: Introduction.
Section 6.2: Conditional execution- the if Statement.
Section 6.3: Employee Payroll: An Example.
Java Interlude: The if Statement.
Section 6.4: Input Methods Revisited: Testing for End of Input.
Section 6.5: Type boolean and boolean-valued expressions.
Section 6.6: A Time class.
Java Interlude: boolean, Compound Conditionals, Logical Operators.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Responding to Controls:Event-handling.
GUI Supplement II: Bringing the Calculator to Life.
7. Verifying Object Behavior. Section 7.1: Introduction.
Section 7.2: Categories of Errors.
Section 7.3: Test Drivers.
Section 7.4 Automatic Testing.
Section 7.5: What to Test and How to Test It.
Section 7.6: Debugging Techniques.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
8. Working with Multiple Objects. Section 8.1: Introduction.
Section 8.2: Processing Multiple Objects.
Section 8.3: Loop Patterns.
Section 8.4: The Impact of Loops on Testing.
Section 8.5: A Radio Stationis Song library.
Section 8.6: Maintaining Multiple Values.
Section 8.7: Vector-A Simple Collection Class.
Section 8.8: Moving Through a Vector-Enumerations.
Section 8.9: Revisiting the SongLibrary class.
Java Interlude: Primitive Types and Collections; Revisiting the Wrapper Classes.
Section 8.10: An Example: Determing a Studentis Relative Performance.
Section 8.11: Sets.
Java Interlude: Class Object Methods.
Summary.
Study Aid: Terminology Review.
Questions for Review.
GUI Supplement: List, Checkbox, CheckboxGroup.
9. Iteration. Section 9.1: Introduction.
Section 9.2: Designing Loops.
Section 9.3: Another Simple Example.
Section 9.4: Revisiting the loop patterns of Chapter 8.
Section 9.5: Variations on the Payroll Loop.
Section 9.6: More Loop Patterns: Counters, Accumulators, Extremes.
Section 9.7: Java Interlude: The for loop; short-circuits; break and continue.
Section 9.8: A Loop Design Strategy: Refining an Imperfect Solution.
Section 9.9: The Radio Station's Play Schedule.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement Threads.
10. Organizing Objects. Section 10.1: Indexing.
Section 10.2: The Limitations of Enumerations.
Section 10.3: Searching.
Section 10.4: Self-Organizing Vectors.
Java Interlude.
Section 10.5: Finding the Index of an Extreme.
Section 10.6: Binary Search.
Section 10.7: Sorting.
Section 10.8: Introducing Arrays.
Section 10.9: Vectors and Arrays.
Section 10.10: Command-line Arguments.
Section 10.11: Strings and Indices.
Section 10.12: The Game of Life: Two Dimensional Arrays.
Summary.
Questions for Review.
Terminology.
Further Exercises.
GUI Supplement: The Game of Life.
11. Recursion. Section 11.1: Introduction.
Section 11.2: Example: Exponentiation.
Section 11.3: How to Design a Recursive Method.
Section 11.4: Recursive Methods: Under the Hood.
Section 11.5: Finding A Square Root.
Section 11.6: Recursion with Vectors, Arrays and Strings.
Section 11.7: Permutations.
Section 11.8: Recursion and Iteration; Trade-offs.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Terminology.
Further Exercises.
GUI Supplement: The Towers of Hanoi.
12. Examples. Section 12.1: Introduction.
Section 12.2: The LOGO Turtle.
Section 12.3: Web Site Maintenance.
Section 12.4: The Game of Mancala.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement A Graphical Interface for Mancala.
13. Extending Class Behavior. Section 13.1: Introduction.
Section 13.2: Extending classes-Inheritance I.
Section 13.3: A Better BufferedReader.
Section 13.4: Adding State to the Subclass; Accessing the Superclass's State.
Section 13.5: Revisiting the Name Class-Adding Additional State.
Java Interlude: Inheritance.
Section 13.6: Overriding Methods.
Java Interlude: Polymorphism.
Section 13.7: Factoring out Common Behavior-Inheritance II.
Section 13.8: Abstract methods and classes.
Section 13.9: Specifying Common Behavior-Interfaces.
Section 13.10: A Generic Sorting Method.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
GUI Supplement: Exploring the AWT Portion of the Java Class Hierarchy.
GUI Supplement 2: Swing.
14. Exceptions. Section 14.1: Expect the Unexpected.
Section 14.2: Encountering the Unexpected.
Java Interlude: The Exception Class.
Section 14.3: Handling the Unexpected.
Section 14.4: Responsibility for the Unexpected.
Section 14.5: Exceptions Are Not Always Errors.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
Net Supplement Client-Server Programming. Java Clients
Appendix A. Glossary of All Terms. Appendix B. Editing, Compiling and Running Java Programs. Appendix C. Annotated List of Java Classes,Interfaces, Methods, Variables and Constants Used in this Text. Appendix D. Exercises for the GUI. Appendix E. AWIO. Index.