![]() |
Java for
|
involved in the production, and does not endorse this book |
| Title: | Java for AP Computer Science (First Edition) |
| Authors: | Tom West and Christine Stephenson |
| ISBN: | 0-921598-51-3 |
| Publisher: | Holt Software Associates Inc. |
| Binding: | Hardcover |
| Pages: | 950 pgs + Appendices |
| Price (US): | Bookstores & Schools: US$49.95 Retail: $62.50 |
| Price (Cdn): | Bookstores & Schools: Cdn$64.95 Retail: $81.25 |
| Ordering Information: | For bookstores and schools, click here for
ordering information. For individuals click here for ordering information. |
| Errata: | Errors found in the current printing |
| Program Examples: | Found on CD included with book |
| Solutions Manual: | Not yet available |
Java for AP Computer Science is designed to ensure that students obtain a more in-depth knowledge of Java. It provides detailed tracing examples for small and large programs to help students understand how Java constructs operate. The text also provides detailed analysis, design, and implementation of several large programs to illustrate programming design principles.
Java for AP Computer Science uses pre-built classes to allow students to use graphics in a pedagogically useful manner. These include classes to create patterns using "PaintBugs", create smooth animations, visualize different sorting algorithms, and create graphical representations of trees.
Chapters also include complete sets of exercise broken down by subsection to allow partial coverage of chapters. Many chapters also include self-quizzes with answers and explanations as to how the answers were achieved. Finally, most chapters also include additional technical details and sidebars emphasizing critical concepts.
Two sample chapters in PDF format (Chapter 8: Loops and Chapter 14: Inheritance illustrate the style in which the book is written. The Table of Contents and the Index provide you with a good idea of how the topics are covered in the book.
The book is also produced with the realization of tight budgets in the educational world. The book is currently priced as a 950+ page 8"x10" hardcover at US$49.95 (CDN$64.95) including shipping.
Java for AP Computer Science comes with a CD and license to use Holt Software's Ready to Program with Java Technology, a full Java development environment designed specifically for education containing everything you need to write Java programs. The CD also contains all the example classes found in the book. Note that while the book does provide information on the Ready environment (installation and how-to-use guides in the appendices), the text and all sample classes do not require the use of Ready and can be used with any Java IDE (version 1.3 or later).
| Page | Errata | ||||||
| 267 | The title of Section 7.9.1 should be 7.9.1 Answer - If Constructs (pg 240) | ||||||
| 314 | In question d, there is a semicolon after the for statement. Thus the output should simply be '5'. Alternatively, you could correct the question on page 292 by removing the semicolon and keep the answer, depending on whether you like trick questions. | ||||||
| 374 | The table at the bottom of page 374 is in error.
| ||||||
| 648 | In question 8, the two calls to exer7 should read
exer8 and the call exer8 (150) should read exer8 (150, 2) 672 | In the table on page 672, the second column, second row reads | Determine if first (= 0) is greater than last (=12). The comparison is false In this case, last is 15, not 12 731 | In the output of the InsertionSort program, the
insertLoc and boundary columns are reversed.
| 788,789 | In the DoubleListNode class listing, all
references to ListNode should refer to
DoubleListNode
| |
The text emphasizes an understanding of the fundamental concepts of computer science. The book also endeavors to provide enough supporting detail about the actual implementation of these concepts in Java that students understand not only the behavior of the implementation, but also why the behavior occurs.
Java for AP Computer Science uses an "Objects Early" approach rather than an "Objects First" approach. The general concept of object oriented programming is introduced before the students write their first line of code. The creation of objects in student programs, however, takes place after an introduction to the basic concepts of programming. We believe this "Objects Early" approach allows students to understand exactly why programs are written in the way they are, rather than requiring them to "just do it this way for now".
Because the AP Java language requirements are designed to facilitate testing, they do not include all the elements of Java necessary to write functional programs. We have therefore included elements of Java that allow students to write meaningful programs.
Since the AP can serve as an exemption for a first college level course in computer science, this text also includes elements of the Java language that students in university are expected to be familiar with. These are covered so that students will have some basic familiarity with them, although much less emphasis is placed upon them in exercises and future chapters.
Lastly, some elements of Java beyond the AP are examined to make the course more rewarding for the students. By learning simple elements of Java to make programs appear more polished and produce graphically pleasing results, students achieve gratification while gaining further experience in the use of object oriented programming.
The sections marked More Details contain information that, while not part of the AP curriculum, has shown itself to be of interest to many students learning the language. There is no need to teach the materials in the More Details section. We hope, however, that many of the questions asked of teachers by more advanced students will be answered in these sections.
It is the opinion of the authors that it is not possible to consistently write correct programs unless there is a clear understanding of exactly how programs operate. To this end, the book contains a number of examples of stepping and tracing both for purposes of illustrating constructs in the Java language, and to familiarize students with the idea of tracing execution of their own programs.
Java for AP Computer Science also devotes a section to the topic of debugging techniques. It has been the authors' experience that even quite competent students are often stymied when their programs fail to operate in the manner that they expect. By providing a technique for systematically finding bugs in their programs, the text endeavors to provide students with a clear course of action when they inevitably discover a bug.
This text uses a number of helper classes to provide functionality to the students that is beyond the level specified by the AP exam. Specifically, helper classes are used to allow simple input of integers into student programs, to help format output, and to give students access to graphics without requiring them to learn a large number of details about window creation, applet execution, and so on. Lastly, some helper classes are provided to allow students to visualize sorting routines, recursion in the Towers of Hanoi, and the creation of trees. These classes are all provided as part of the hsa package and can be used with any development environment supporting Java 1.3 or greater.
One of the challenges when teaching computer science (especially with a curriculum as rigorous as the AP) is to make the course interesting enough to attract students. There are several ways this can be accomplished. The choice of language, Java, is one attractive aspect of the course since students deem Java "industrially relevant" due to the media attention it has received (witness the large number of trade books about Java available in a bookstore).
While Java has facilities for creating elaborate graphical user interfaces, they are less than ideal from a pedagogical perspective (being designed for maximum flexibility with highly experienced programmers in mind rather than student programmers). Java for AP Computer Science therefore provides a number of classes that students will use to produce quite sophisticated graphical animations while not sacrificing valuable learning time to endless details about the intricacies of the Java class library.
The College Board AP Computer Science curriculum specifies a subset of the Java language. It is important to understand how this subset is used, and as importantly, how it is not used.
As of the writing of this preface (July 2003), the AP has no formal policy on handling answers containing features found in later versions of Java beyond version 1.2. Historically, however, there have usually been only minor deductions if the answer was otherwise correct and understood by the evaluator.
http://cs.colgate.edu/APCS/
The use of the Ready to Program software is governed by the license found in Appendix I, which allows the use of the software in a course in connection with this book. A general site license is available for purchase from Holt Software that includes
http://www.holtsoft.com/ready
http://www.holtsoft.com/books/solutions_manuals.html
Almost every textbook has errors discovered after publication. While we endeavor to correct all outstanding errors with each printing, any errors reported to us will be listed on our web page for this book found at
http://www.holtsoft.com/books/java_for_ap.html
Tom West west@hsa.on.ca
Christine Stephenson chris@hsa.on.ca
The list of chapter titles outlines the arrangement of materials
Chapter 1 provides an overview of types of computers, basic hardware design, computer software, system usage, and networks. It also explores social issues involved in computing such as privacy, piracy, intellectual property, and the social impact of computers. It ends with a section on proper personal use of computers. Note that material after this chapter is not dependent on this chapter. You may choose to cover the material in this chapter throughout the course when it may be more appropriate.
Chapter 2 describes the fundamentals of writing and running programs on computers. It covers such elements as the differences between compilers, interpreters, and compiler-interpreters and an overview of different programming languages. It concludes with a non-language specific introduction to object oriented programming.
Chapter 3 introduces Java programming. It details the format of a Java program, covers the concepts of data types, and provides an introduction to each of the Java primitive data types. It then introduces the assignment statement. Student understanding is verified with a pair of self-tests.
Chapter 4 presents expressions in Java. Programs perform calculations and expressions are fundamental to calculations. By dealing explicitly with expressions, the text also introduces the ideas of precision and exactness that are required to successfully write computer programs.
Chapter 5 provides information on program input and output and program design. The sections on input and output cover the use of System.in and System.out as well as the use of the hsa.Stdin class (for simple input). The chapter then presents the development of two programs, QuadraticInput and TermDeposit, using the design techniques covered in Chapter 2. The chapter concludes with a section on programming style.
Chapter 6 discusses the creation of objects and the use of methods. It does so by introducing several classes including the AddressBook class and the PaintBug class. The PaintBug class allows students to use graphics in a pedagogically useful context without overwhelming complexity. The chapter also introduces class methods. The chapter concludes with an introduction to formatted text output, as students are often eager to have the output of their programs appear as professional as possible.
Chapter 7 introduces selection constructs including if statements, if-else structures, multi-way if structures, and the switch statement. It also covers the nesting of selection constructs and different indenting styles.
Chapter 8 presents looping constructs. Both counted loops (for loops) and conditional loops (while and do-while loops) are covered. The chapter also details the break statement, as this allows for a more natural program design for some algorithms.
Chapter 9 formally introduces top-down design using two examples: a phone book and a mortgage program. The chapter also covers the mechanics of testing programs including full coverage and full path testing.
Chapter 10 covers the details of the String class. While the String class has been used throughout previous chapters, this chapter introduces a number of the methods that can be used in conjunction with String objects and provides numerous programs that allow students to practice with the constructs taught so far. The chapter also covers the StringBuffer and StringTokenizer classes.
Chapter 11 provides the details of writing methods. The book specifically uses class methods in this chapter, in order to allow students to focus on one concept at a time. The text covers function-type methods and procedure-type methods along with parameters. It also briefly introduces class variables along with consideration of their use.
Chapter 12 deals with the creation of objects and classes. It provides the full syntactical detail necessary to write a class with fields and methods. It introduces constructors and helper methods (methods that are not part of the interface).
Chapter 13 covers the declaration, creation, and use of arrays. It presents a program that uses an array to control a series of bank accounts and a class that uses arrays to implement a phone book. The chapter details the concept of related arrays and operations on arrays such as inserting and removing an element. The chapter also covers two-dimensional arrays.
Chapter 14 deals with inheritance, polymorphism, abstract classes, and class hierarchies. It does this using classes that implement animation, allowing students to learn the concepts while producing graphically interesting programs.
Chapter 15 discusses recursion, including mutual recursion. It uses the Towers of Hanoi, an expression evaluator, and the "Dragon Curve" to illustrate recursion both theoretically and graphically.
Chapter 16 covers linear search, binary search, and hashing. The concept of key-value storage is also discussed. The chapter also introduces the concept of genericity and the Object class, as well as Java's implementation of multiple inheritance (interfaces). The chapter also introduces the ArrayList class.
Chapter 17 covers sorting including selection sort, insertion sort, merge sort, and quicksort. The chapter uses a separate class to implement common elements of each sort, allowing concentration on the specific characteristics of each sort. The chapter concludes by visually displaying the different sorting process using a helper class to allow students to better understand how the sorts work.
Chapter 18 details linked lists including the different variants of linked lists and concepts like insertion, deletion, and using interators to list elements in the list. The chapter also shows the creation of a larger multiple class program consisting of five separate classes. The chapter concludes with an explanation of the use of chaining in hash tables and a larger program demonstrating the use of chaining.
Chapter 19 covers the use of trees. This chapter demonstrates several algorithms using trees including different traversal algorithms. The chapter includes an implementation of a Binary Search Tree and ends with an explanation of the heap sort. The chapter uses a helper class that visually depicts trees in a window to help students understand how trees can be created.
Chapter 20 introduces the different data structures found in the Java class library that are part of the AP computer science curriculum. This includes the List, Iterator, and ListIterator interfaces, the ArrayList and LinkedList classes, the Set and Map interfaces, and the HashSet, TreeSet, HashMap, and TreeMap classes. Each class is illustrated with a sample program. The chapter concludes with an implementation of a library automation system using several of the classes introduced in this chapter.
Chapter 21 explains the stack, queue, and priority queue data structures. Each data structure is demonstrated using one or two examples. The chapter introduces students to the concept of using the computer to simulate real-life activities by including a simulation of the operations of a bank.
The authors would like to gratefully acknowledge the assistance of our set of readers, who volunteered their time to find errors, suggest improvements, and generally help increase the quality of the book from its first iteration to what you now hold in your hand. Without their help, this book would be much diminished.
The readers, in alphabetical order are:
| PREFACE | XVIII | |||
| ACKNOWLEDGEMENTS | XXVI | |||
| 1 | COMPUTER HARDWARE AND SOFTWARE | 1 | ||
| 1.0 | Introduction | 1 | ||
| 1.1 | Types of Computers | 1 | ||
| 1.1.1 | Supercomputers | 2 | ||
| 1.1.2 | Mainframes | 2 | ||
| 1.1.3 | Minicomputers (Workstations) | 2 | ||
| 1.1.4 | Microcomputers (Personal Computers) | 3 | ||
| 1.1.5 | Embedded Computers | 3 | ||
| 1.2 | Computer Hardware Design | 3 | ||
| 1.2.1 | CPU | 4 | ||
| 1.2.2 | Primary Memory (Main Memory) | 6 | ||
| 1.2.3 | Secondary Memory (Storage Devices) | 7 | ||
| 1.2.4 | Peripherals | 8 | ||
| 1.3 | Computer Software | 10 | ||
| 1.3.1 | Operating Systems | 10 | ||
| 1.3.2 | Applications | 11 | ||
| 1.4 | Computer Systems Usage | 12 | ||
| 1.4.1 | Single User Systems | 12 | ||
| 1.4.2 | Multi-user Systems | 13 | ||
| 1.5 | Networks | 14 | ||
| 1.5.1 | Client-Server Architecture | 14 | ||
| 1.5.2 | Peer-to-Peer Architecture | 15 | ||
| 1.5.3 | The Internet | 16 | ||
| 1.6 | Social Issues in Computing | 17 | ||
| 1.6.1 | Software Piracy | 17 | ||
| 1.6.2 | Privacy | 18 | ||
| 1.6.3 | Social Impact | 20 | ||
| 1.6.4 | Intellectual Property | 22 | ||
| 1.7 | Responsible Computer Usage | 23 | ||
| 1.7.1 | Use of Computer in Schools | 23 | ||
| 1.7.2 | Use of Computers on the Internet | 24 | ||
| 1.7.3 | Safety from Viruses | 24 | ||
| 1.7.4 | Safe Computer Use | 26 | ||
| 1.8 | Technical Terms | 26 | ||
| 1.9 | What You Should Know | 27 | ||
| 1.10 | Exercises | 28 | ||
| 2 | COMPUTER PROGRAMMING | 29 | ||
| 2.0 | Introduction | 29 | ||
| 2.1 | What is Computer Programming? | 29 | ||
| 2.2 | Creating Programs | 30 | ||
| 2.2.1 | Compilers | 31 | ||
| 2.2.2 | Interpreters | 32 | ||
| 2.2.3 | Compiler-Interpreters | 32 | ||
| 2.3 | Program Errors | 34 | ||
| 2.3.1 | Compile-time Errors | 34 | ||
| 2.3.2 | Run-time Errors | 34 | ||
| 2.3.3 | Logic Error | 34 | ||
| 2.4 | Programming Languages | 35 | ||
| 2.4.1 | Low and High Level Languages | 36 | ||
| 2.4.2 | Older Programming Languages | 37 | ||
| 2.4.3 | The C Programming Language | 37 | ||
| 2.4.4 | C++ | 38 | ||
| 2.4.5 | Java | 39 | ||
| 2.4.6 | Using Programming Languages | 40 | ||
| 2.5 | Program Life Cycle | 41 | ||
| 2.6 | Program Design Techniques | 44 | ||
| 2.7 | Object Oriented Programming | 45 | ||
| 2.7.1 | Objects in Real Life | 47 | ||
| 2.7.2 | Objects in Programs | 48 | ||
| 2.7.3 | Objects Containing Objects | 50 | ||
| 2.7.4 | Classes | 50 | ||
| 2.7.5 | Object Oriented Analysis | 51 | ||
| 2.8 | Types of Java Programs | 53 | ||
| 2.8.1 | Applications | 53 | ||
| 2.8.2 | Applets | 55 | ||
| 2.9 | Technical Terms | 56 | ||
| 2.10 | What You Should Know | 57 | ||
| 2.11 | Exercises | 58 | ||
| 3 | JAVA PROGRAMS AND DATA TYPES | 61 | ||
| 3.0 | Introduction | 61 | ||
| 3.1 | General Forms of Java Programs | 62 | ||
| 3.1.1 | Initial Comment | 62 | ||
| 3.1.2 | Import Statements | 63 | ||
| 3.1.3 | Class Declaration | 63 | ||
| 3.1.4 | Main Method Declaration | 64 | ||
| 3.1.5 | Main Method Contents | 67 | ||
| 3.1.6 | Close of Main Method | 68 | ||
| 3.1.7 | Close of Class | 68 | ||
| 3.1.8 | A Template for an Application | 68 | ||
| 3.1.9 | Case Sensitivity | 69 | ||
| 3.1.10 | Exercises | 69 | ||
| 3.2 | Variables and Data Types | 70 | ||
| 3.2.1 | Variables | 70 | ||
| 3.2.2 | Data Types | 72 | ||
| 3.2.3 | int | 72 | ||
| 3.2.4 | double | 73 | ||
| 3.2.5 | boolean | 75 | ||
| 3.2.6 | char | 75 | ||
| 3.2.7 | byte, short, long, float | 76 | ||
| 3.2.8 | Examples of Variables and Data Types | 77 | ||
| 3.2.9 | Quiz Yourself - Variables and Data Types | 78 | ||
| 3.3 | Assignment Statements | 78 | ||
| 3.3.1 | Basic Assignment Statement | 78 | ||
| 3.3.2 | Assigning Another Value | 80 | ||
| 3.3.3 | Assigning From a Variable | 81 | ||
| 3.3.4 | Declaration and Assignment | 84 | ||
| 3.3.5 | Constants | 84 | ||
| 3.3.6 | Exponential Notation | 85 | ||
| 3.3.7 | Uninitialized Variables | 85 | ||
| 3.3.8 | Data Type Conversion (Casting) | 86 | ||
| 3.3.9 | Rounding | 87 | ||
| 3.3.10 | Quiz Yourself - Data Conversion and Rounding | 88 | ||
| 3.4 | Compile-Time Errors in Java | 89 | ||
| 3.4.1 | Example Errors | 89 | ||
| 3.4.2 | Finding and Fixing Compile-Time Errors | 91 | ||
| 3.5 | Technical Terms | 92 | ||
| 3.6 | What You Should Know | 92 | ||
| 3.7 | Quiz Answers | 93 | ||
| 3.7.1 | Answers - Variables and Data Types (pg. 78) | 93 | ||
| 3.7.2 | Answers - Data Conversion and Rounding (pg. 88) | 94 | ||
| 3.8 | Exercises | 96 | ||
| 4 | EXPRESSIONS | 103 | ||
| 4.0 | Introduction | 103 | ||
| 4.1 | Mathematical Expressions | 103 | ||
| 4.1.1 | Mathematical Operators | 104 | ||
| 4.1.2 | Operator Precedence | 109 | ||
| 4.1.3 | Complex Expressions | 110 | ||
| 4.1.4 | Compound Assignment Operators | 113 | ||
| 4.1.5 | Autoincrement and Autodecrement | 115 | ||
| 4.1.6 | Functions in Mathematical Expressions | 116 | ||
| 4.1.7 | Examples of Mathematical Expressions | 117 | ||
| 4.1.8 | Quiz Yourself - Mathematical Expressions | 117 | ||
| 4.2 | String Variables | 118 | ||
| 4.2.1 | How Strings are Stored | 118 | ||
| 4.2.2 | Assigning Strings | 119 | ||
| 4.2.3 | Special Characters | 120 | ||
| 4.2.4 | String Expressions | 121 | ||
| 4.2.5 | Concatenating a String with a Non-String | 122 | ||
| 4.2.6 | Examples of Using Strings | 124 | ||
| 4.2.7 | Quiz Yourself - String Variables | 125 | ||
| 4.3 | Boolean Expressions | 125 | ||
| 4.3.1 | Logical Operators | 127 | ||
| 4.3.2 | Short Circuit Evaluation | 129 | ||
| 4.3.3 | Examples of Boolean Expressions | 130 | ||
| 4.3.4 | Quiz Yourself - Boolean Expressions | 131 | ||
| 4.4 | Mathematical Functions | 131 | ||
| 4.4.1 | Rounding Up and Down | 131 | ||
| 4.4.2 | Trigonometry | 134 | ||
| 4.4.3 | Square Root | 135 | ||
| 4.4.4 | Absolute Value | 136 | ||
| 4.4.5 | Exponentiation | 137 | ||
| 4.4.6 | Minimum and Maximum | 137 | ||
| 4.4.7 | Random Numbers | 138 | ||
| 4.4.8 | Table of Functions | 139 | ||
| 4.5 | Run-Time Errors in Java | 140 | ||
| 4.5.1 | Finding and Fixing Run-Time Errors | 141 | ||
| 4.5.2 | Mathematical Operations and NaN | 141 | ||
| 4.6 | Technical Terms | 141 | ||
| 4.7 | What You Should Know | 142 | ||
| 4.8 | Quiz Answers | 142 | ||
| 4.8.1 | Answers - Mathematical Expressions (pg. 117) | 142 | ||
| 4.8.2 | Answers - String Variables (pg. 125) | 144 | ||
| 4.8.3 | Answers - Boolean Expressions (pg. 131) | 146 | ||
| 4.9 | Exercises | 148 | ||
| 5 | WRITING JAVA PROGRAMS | 157 | ||
| 5.0 | Introduction | 157 | ||
| 5.1 | Text Output | 157 | ||
| 5.1.1 | The System Console | 157 | ||
| 5.1.2 | System.out Object | 159 | ||
| 5.1.3 | System Console Cursor | 160 | ||
| 5.2 | Text Input | 162 | ||
| 5.2.1 | System.in (Optional) | 162 | ||
| 5.2.2 | hsa.Stdin | 165 | ||
| 5.3 | Writing Programs | 170 | ||
| 5.3.1 | Quadratic Equation Example Program | 170 | ||
| 5.3.2 | Term Deposit Example Program | 175 | ||
| 5.4 | Programming Style | 180 | ||
| 5.4.1 | Comments | 181 | ||
| 5.4.2 | Style Guidelines | 183 | ||
| 5.5 | Technical Terms | 184 | ||
| 5.6 | What You Should Know | 184 | ||
| 5.7 | Exercises | 185 | ||
| 6 | USING OBJECTS AND METHODS | 189 | ||
| 6.0 | Introduction | 189 | ||
| 6.1 | Creating Objects | 190 | ||
| 6.1.1 | Review | 190 | ||
| 6.1.2 | Java Classes | 190 | ||
| 6.1.3 | The import Statement | 191 | ||
| 6.1.4 | Object Variables | 193 | ||
| 6.1.5 | Declaring Object Variables | 196 | ||
| 6.1.6 | Instantiation (Creating Objects) | 196 | ||
| 6.2 | Using Methods | 198 | ||
| 6.2.1 | Review | 198 | ||
| 6.2.2 | Syntax of a Method Call | 198 | ||
| 6.2.3 | Phone Book Example | 199 | ||
| 6.2.4 | String Class Example | 200 | ||
| 6.2.5 | Random Class Example | 200 | ||
| 6.2.6 | Signatures and Interfaces | 201 | ||
| 6.3 | Class or Static Methods | 212 | ||
| 6.3.1 | Signature Appearance | 213 | ||
| 6.3.2 | Examples of Class Methods - The Math Class | 213 | ||
| 6.3.3 | Examples of Class Methods - The PaintBug Class | 215 | ||
| 6.4 | Formatted Text Output | 216 | ||
| 6.4.1 | Formatting Using hsa.Stdout | 217 | ||
| 6.4.2 | Formatting Numbers Using NumberFormat | 223 | ||
| 6.4.3 | Formatting Using Date and DateFormat | 229 | ||
| 6.5 | Technical Terms | 232 | ||
| 6.6 | What You Should Know | 232 | ||
| 6.7 | Exercises | 233 | ||
| 7 | SELECTION CONSTRUCTS | 235 | ||
| 7.0 | Introduction | 235 | ||
| 7.1 | If-Then Structure | 235 | ||
| 7.1.1 | Conditional Execution | 235 | ||
| 7.1.2 | If-Then in Java | 236 | ||
| 7.1.3 | Visualizing Flow of Execution | 237 | ||
| 7.1.4 | More About the If Clause | 239 | ||
| 7.1.5 | Another Example of the If-Then Construct | 239 | ||
| 7.1.6 | Quiz Yourself - If Construct | 240 | ||
| 7.2 | If-Then-Else Structure | 241 | ||
| 7.2.1 | Java | 242 | ||
| 7.2.2 | More About the Else Clause | 243 | ||
| 7.2.3 | Another Example | 243 | ||
| 7.2.4 | Quiz Yourself - If-Else Construct | 246 | ||
| 7.3 | Nesting If | 247 | ||
| 7.3.1 | Example of Nested If | 247 | ||
| 7.3.2 | Alternate Structure | 252 | ||
| 7.3.3 | Another Example of Nested If | 254 | ||
| 7.3.4 | Quiz Yourself - Nested If | 256 | ||
| 7.4 | Indentation Styles | 258 | ||
| 7.5 | Switch Construct | 259 | ||
| 7.5.1 | The Break Statement | 263 | ||
| 7.5.2 | Characters in a Switch Construct | 264 | ||
| 7.5.3 | Switch Construct Versus Multi-way If Construct | 265 | ||
| 7.6 | Common Errors | 265 | ||
| 7.7 | Technical Terms | 266 | ||
| 7.8 | What You Should Know | 267 | ||
| 7.9 | Quiz Answers | 267 | ||
| 7.9.1 | Answers - Simple Counted Loops (pg. 240) | 267 | ||
| 7.9.2 | Answers - If-Else Construct (pg. 246) | 269 | ||
| 7.9.3 | Answers - Nested If (pg. 256) | 271 | ||
| 7.10 | Exercises | 274 | ||
| 8 | LOOPS | 281 | ||
| 8.0 | Introduction | 281 | ||
| 8.1 | Introduction to Loops | 281 | ||
| 8.2 | Pseudo-code | 282 | ||
| 8.3 | Counted Loops | 283 | ||
| 8.3.1 | Simple Counted Loops | 283 | ||
| 8.3.2 | Quiz Yourself - Simple Counted Loops | 288 | ||
| 8.3.3 | More Complicated Counted Loops | 288 | ||
| 8.3.4 | Quiz Yourself - Counted Loops | 292 | ||
| 8.4 | Conditional Loops | 293 | ||
| 8.4.1 | While Loops | 293 | ||
| 8.4.2 | Quiz Yourself - While Loops | 295 | ||
| 8.4.3 | Do Loops | 296 | ||
| 8.5 | Choosing Which Loop | 299 | ||
| 8.5.1 | Counted Loops vs. Conditional Loops | 299 | ||
| 8.6 | Breaking Out of Loops | 300 | ||
| 8.6.1 | The Break Statement | 301 | ||
| 8.6.2 | Break Statements and Counted Loops | 302 | ||
| 8.6.3 | Multiple Break Statements | 303 | ||
| 8.6.4 | Break vs. Loop Restructuring | 305 | ||
| 8.7 | Nesting Loops | 305 | ||
| 8.8 | Technical Terms | 310 | ||
| 8.9 | What You Should Know | 311 | ||
| 8.10 | Quiz Answers | 311 | ||
| 8.10.1 | Answers - Simple Counted Loops (pg. 288) | 311 | ||
| 8.10.2 | Answers - Counted Loops (pg. 292) | 313 | ||
| 8.10.3 | Answers - While Loops (pg. 295) | 315 | ||
| 8.11 | Exercises | 318 | ||
| 9 | TOP DOWN PROGRAM DESIGN | 323 | ||
| 9.0 | Introduction | 323 | ||
| 9.1 | Review | 323 | ||
| 9.2 | Top Down Programming Technique | 324 | ||
| 9.3 | The PhoneBookExample Program | 324 | ||
| 9.3.1 | Specification of the PhoneBookExample Program | 324 | ||
| 9.3.2 | Design for the PhoneBookExample Program | 324 | ||
| 9.3.3 | Implementation Stage for PhoneBookExample | 333 | ||
| 9.4 | Testing | 336 | ||
| 9.4.1 | Different Types of Problems | 336 | ||
| 9.4.2 | Different Types of Testing | 337 | ||
| 9.5 | The Mortgage Program | 341 | ||
| 9.5.1 | Specification of the Mortgage Program | 341 | ||
| 9.5.2 | Design for the Mortgage Program | 341 | ||
| 9.5.3 | Implementation Stage for Mortgage | 352 | ||
| 9.5.4 | Output from the Mortgage Program | 354 | ||
| 9.6 | Testing of the Mortgage Program | 355 | ||
| 9.7 | Technical Terms | 361 | ||
| 9.8 | What You Should Know | 361 | ||
| 9.9 | Exercises | 361 | ||
| 10 | STRINGS | 363 | ||
| 10.0 | Introduction | 363 | ||
| 10.1 | Review | 363 | ||
| 10.1.1 | Strings | 363 | ||
| 10.1.2 | Objects and References | 364 | ||
| 10.2 | The String Class | 365 | ||
| 10.2.1 | String Literals | 365 | ||
| 10.2.2 | String Objects and Aliasing | 366 | ||
| 10.2.3 | Immutable Types | 367 | ||
| 10.3 | Testing For Equality in Strings | 370 | ||
| 10.3.1 | The equals method | 371 | ||
| 10.3.2 | CountStudents Example | 373 | ||
| 10.3.3 | The equalsIgnoreCase method | 374 | ||
| 10.4 | Comparing Strings | 374 | ||
| 10.4.1 | How String Comparisons are Performed | 375 | ||
| 10.4.2 | The SortThree Example | 377 | ||
| 10.4.3 | The FirstLastWord Example | 379 | ||
| 10.4.4 | The compareToIgnoreCase method | 381 | ||
| 10.5 | Substrings | 381 | ||
| 10.5.1 | The length Method | 381 | ||
| 10.5.2 | The charAt Method | 382 | ||
| 10.5.3 | The substring Method | 386 | ||
| 10.6 | Finding Characters or Strings in a String | 390 | ||
| 10.6.1 | Searching For a Character | 390 | ||
| 10.6.2 | Searching For a String | 395 | ||
| 10.7 | More String Methods | 397 | ||
| 10.8 | The FindThe Example | 399 | ||
| 10.8.1 | The Specification | 399 | ||
| 10.8.2 | The Design | 400 | ||
| 10.8.3 | Implementation | 402 | ||
| 10.9 | String Manipulation | 404 | ||
| 10.9.1 | String Construction | 404 | ||
| 10.9.2 | The StringBuffer Class | 404 | ||
| 10.9.3 | The MakeCountDown Example | 407 | ||
| 10.9.4 | The ClipIt Example | 408 | ||
| 10.10 | String Tokenizer | 409 | ||
| 10.11 | Technical Terms | 412 | ||
| 10.12 | What You Should Know | 412 | ||
| 10.13 | Exercises | 413 | ||
| 11 | METHODS | 417 | ||
| 11.0 | Introduction | 417 | ||
| 11.1 | Introduction to Methods | 417 | ||
| 11.1.1 | What is a Method? | 417 | ||
| 11.1.2 | Using Methods to Structure Programs | 418 | ||
| 11.1.3 | Reusing Methods | 418 | ||
| 11.2 | Review of Methods | 419 | ||
| 11.3 | Methods Without Parameters | 420 | ||
| 11.3.1 | Local Variables | 423 | ||
| 11.3.2 | Multiple Methods | 424 | ||
| 11.3.3 | The Stack | 425 | ||
| 11.3.4 | Function-Type Example | 428 | ||
| 11.3.5 | The return Statement | 431 | ||
| 11.3.6 | Tracing | 431 | ||
| 11.4 | Creating Methods With Parameters | 434 | ||
| 11.4.1 | Function-Type Methods with Parameters | 441 | ||
| 11.4.2 | Returning Objects | 442 | ||
| 11.5 | Class Variables | 445 | ||
| 11.5.1 | Default Values of Class Variables | 446 | ||
| 11.5.2 | Tradeoffs | 446 | ||
| 11.5.3 | Class Constants | 447 | ||
| 11.6 | Unit Testing | 448 | ||
| 11.6.1 | Example of a Unit Test | 448 | ||
| 11.7 | Errors and Debugging | 449 | ||
| 11.7.1 | Debugging Technique | 450 | ||
| 11.7.2 | Tracing Execution | 450 | ||
| 11.7.3 | Run-Time Errors and Stack Dumps | 455 | ||
| 11.8 | Technical Terms | 458 | ||
| 11.9 | What You Should Know | 458 | ||
| 11.10 | Exercises | 459 | ||
| 12 | OBJECTS AND CLASSES | 465 | ||
| 12.0 | Introduction | 465 | ||
| 12.1 | Review | 465 | ||
| 12.1.1 | Objects | 465 | ||
| 12.1.2 | Classes | 466 | ||
| 12.1.3 | Objects in Java | 466 | ||
| 12.2 | Fields | 467 | ||
| 12.2.1 | Syntax of Field Declarations | 468 | ||
| 12.2.2 | Objects in a Field | 469 | ||
| 12.2.3 | Default Values of Fields | 469 | ||
| 12.2.4 | Initialization of Fields | 469 | ||
| 12.3 | Methods in the Interface | 469 | ||
| 12.3.1 | Syntax for Methods in the Interface | 470 | ||
| 12.3.2 | Calling Methods in the Interface | 470 | ||
| 12.3.3 | Bank Account Example | 471 | ||
| 12.3.4 | Accessor Methods and Object Oriented Design | 473 | ||
| 12.3.5 | Using the Account Class | 474 | ||
| 12.4 | Constructors | 476 | ||
| 12.4.1 | Default Constructor | 477 | ||
| 12.4.2 | Overloading Constructors | 477 | ||
| 12.5 | Helper Methods | 478 | ||
| 12.5.1 | Syntax for Helper Methods | 478 | ||
| 12.5.2 | Calling Methods from Within the Class | 479 | ||
| 12.5.3 | Using Other Classes | 479 | ||
| 12.6 | The ImprovedAccount Class | 480 | ||
| 12.6.1 | Tracing Execution | 484 | ||
| 12.7 | Using Multiple Objects | 490 | ||
| 12.7.1 | The Specification | 490 | ||
| 12.7.2 | The Design | 490 | ||
| 12.7.3 | Program Execution | 500 | ||
| 12.8 | The MultiBug Class | 502 | ||
| 12.8.1 | The MultiBug Interface | 503 | ||
| 12.8.2 | A Program Using the MultiBug Class | 503 | ||
| 12.8.3 | Implementation of the MultiBug Class | 505 | ||
| 12.9 | Unit Testing | 507 | ||
| 12.10 | Technical Terms | 507 | ||
| 12.11 | What You Should Know | 508 | ||
| 12.12 | Exercises | 508 | ||
| 13 | ARRAYS | 513 | ||
| 13.0 | Introduction | 513 | ||
| 13.1 | What is an Array | 513 | ||
| 13.1.1 | Declaring an Array | 514 | ||
| 13.1.2 | Creating an Array | 514 | ||
| 13.1.3 | Accessing Elements of an Array | 516 | ||
| 13.1.4 | Variables as an Array Index | 516 | ||
| 13.1.5 | Initializing an Array | 520 | ||
| 13.1.6 | The length field | 521 | ||
| 13.1.7 | Common Errors with Arrays | 522 | ||
| 13.2 | Related Arrays | 523 | ||
| 13.2.1 | Tracing of Program using Arrays | 526 | ||
| 13.3 | The BankArrayTest Example | 530 | ||
| 13.3.1 | The Specification | 530 | ||
| 13.3.2 | The Design | 531 | ||
| 13.3.3 | The Implementation | 531 | ||
| 13.3.4 | Conclusion | 536 | ||
| 13.4 | The SimplePhoneBook Class | 536 | ||
| 13.4.1 | The Interface to the SimplePhoneBook Class | 536 | ||
| 13.4.2 | The Data | 537 | ||
| 13.4.3 | The Constructor | 537 | ||
| 13.4.4 | The add Method | 538 | ||
| 13.4.5 | The lookUp Method | 538 | ||
| 13.5 | Operations on Arrays | 539 | ||
| 13.5.1 | Insertion of an Element into an Array | 539 | ||
| 13.5.2 | Deletion of an Element from an Array | 545 | ||
| 13.5.3 | Using the SortedPhoneBook Class | 548 | ||
| 13.6 | Two-Dimensional Arrays (AB) | 552 | ||
| 13.6.1 | Declaring a Two-Dimensional Array | 552 | ||
| 13.6.2 | Creating a Two-Dimensional Array | 553 | ||
| 13.6.3 | Accessing Elements of an Two-Dimensional Array | 554 | ||
| 13.6.4 | Mapping Columns to Index Values | 554 | ||
| 13.6.5 | For Loops and Two-Dimensional Arrays | 555 | ||
| 13.6.6 | The SalesReport1 Program | 555 | ||
| 13.6.7 | The SalesReport2 Program | 560 | ||
| 13.7 | Technical Terms | 563 | ||
| 13.8 | What You Should Know | 563 | ||
| 13.9 | Exercises | 564 | ||
| 14 | INHERITANCE AND INTERFACES | 567 | ||
| 14.0 | Introduction | 567 | ||
| 14.1 | Inheritance | 567 | ||
| 14.1.1 | Inheritance in Real Life | 567 | ||
| 14.1.2 | Inheritance in Programming | 568 | ||
| 14.1.3 | Syntax for Inheritance | 570 | ||
| 14.1.4 | Overriding Methods | 577 | ||
| 14.2 | Polymorphism | 580 | ||
| 14.2.1 | Why Does Polymorphism Work? | 581 | ||
| 14.3 | Animation Using Polymorphism | 582 | ||
| 14.3.1 | The Animator Class | 583 | ||
| 14.3.2 | The Moveable Class | 585 | ||
| 14.3.3 | Moving The Object Yourself | 589 | ||
| 14.3.4 | Adding Different Classes | 590 | ||
| 14.3.5 | The Graphics Class | 591 | ||
| 14.3.6 | Loading and Displaying Graphics Files | 600 | ||
| 14.3.7 | Using Fonts | 602 | ||
| 14.3.8 | Using super to Call Methods in the Parent | 605 | ||
| 14.4 | Abstract Classes | 605 | ||
| 14.4.1 | Syntax for an Abstract Class | 606 | ||
| 14.4.2 | Using Abstract Classes | 608 | ||
| 14.4.3 | A Larger Example | 608 | ||
| 14.5 | Class Hierarchies | 615 | ||
| 14.5.1 | Executing Methods | 616 | ||
| 14.5.2 | Polymorphism in Class Hierarchies | 616 | ||
| 14.5.3 | Class Hierarchies in Real Life | 616 | ||
| 14.6 | Technical Terms | 617 | ||
| 14.7 | What You Should Know | 617 | ||
| 14.8 | Exercises | 618 | ||
| 15 | RECURSION | 621 | ||
| 15.0 | Introduction | 621 | ||
| 15.1 | What is Recursion | 621 | ||
| 15.1.1 | Reversing a String | 621 | ||
| 15.2 | Tracing Execution | 624 | ||
| 15.3 | Towers of Hanoi | 628 | ||
| 15.3.1 | The Hanoi Program | 630 | ||
| 15.3.2 | Animating the Towers of Hanoi | 631 | ||
| 15.4 | Mutual Recursion | 632 | ||
| 15.4.1 | Expression Evaluator | 633 | ||
| 15.4.2 | Implementing the Evaluator Program | 634 | ||
| 15.5 | Recursion and Graphics - The Dragon Curve | 639 | ||
| 15.5.1 | The DragonCurve Class | 641 | ||
| 15.5.2 | The DragonCurveTest Class | 644 | ||
| 15.6 | Technical Terms | 645 | ||
| 15.7 | What You Should Know | 646 | ||
| 15.8 | Exercises | 646 | ||
| 16 | SEARCHING | 649 | ||
| 16.0 | Introduction | 649 | ||
| 16.1 | Linear Search | 649 | ||
| 16.1.1 | Linear Searching of an Array of Integers | 650 | ||
| 16.1.2 | Linear Searching of an Array of Strings | 653 | ||
| 16.1.3 | Speed of Linear Search | 653 | ||
| 16.2 | Genericity and the Object Class | 657 | ||
| 16.2.1 | The Object Class | 658 | ||
| 16.2.2 | Genericity | 660 | ||
| 16.2.3 | The Object Methods | 662 | ||
| 16.2.4 | Wrapper Classes | 663 | ||
| 16.2.5 | The ArrayList Class | 666 | ||
| 16.3 | Binary Search | 670 | ||
| 16.3.1 | Binary Search of an Array of Integers | 671 | ||
| 16.3.2 | Binary Search of an Array of Strings | 677 | ||
| 16.3.3 | Speed of Binary Search | 678 | ||
| 16.4 | Interfaces and Multiple Inheritance | 679 | ||
| 16.4.1 | Interfaces | 680 | ||
| 16.5 | Data Structure Example | 682 | ||
| 16.5.1 | Generic Data Structures - Key and Data | 682 | ||
| 16.5.2 | The Specification of the Birthplace Program | 684 | ||
| 16.5.3 | The Design | 684 | ||
| 16.5.4 | The Implementation | 686 | ||
| 16.6 | Preconditions and Postconditions | 694 | ||
| 16.6.1 | Preconditions | 694 | ||
| 16.6.2 | Postconditions | 695 | ||
| 16.6.3 | Assertions | 695 | ||
| 16.6.4 | The assert Statement (Optional) | 696 | ||
| 16.6.5 | Invariants (AB) | 698 | ||
| 16.7 | Hashing (AB) | 700 | ||
| 16.7.1 | How Hashing Works | 700 | ||
| 16.7.2 | Hashing Functions | 702 | ||
| 16.7.3 | Handling Collisions | 704 | ||
| 16.7.4 | The StudentHash Program | 706 | ||
| 16.7.5 | Object's hashcode Method | 710 | ||
| 16.7.6 | Speed of Hashing | 715 | ||
| 16.8 | Technical Terms | 715 | ||
| 16.9 | What You Should Know | 716 | ||
| 16.10 | Exercises | 716 | ||
| 17 | SORTING | 719 | ||
| 17.0 | Introduction | 719 | ||
| 17.1 | Introduction to Sorting | 720 | ||
| 17.1.1 | Illustrating Sorting | 720 | ||
| 17.1.2 | Common Elements to a Sort | 720 | ||
| 17.2 | Selection Sort | 723 | ||
| 17.2.1 | Efficiency of Selection Sort | 727 | ||
| 17.3 | Insertion Sort | 728 | ||
| 17.3.1 | Efficiency of Insertion Sort | 731 | ||
| 17.4 | Merge Sort | 732 | ||
| 17.4.1 | Recursive Sorts | 732 | ||
| 17.4.2 | Merge Sort | 733 | ||
| 17.5 | Quicksort (AB) | 738 | ||
| 17.5.1 | Efficiency of Quicksort | 741 | ||
| 17.6 | Visual Sorting | 741 | ||
| 17.7 | Technical Terms | 748 | ||
| 17.8 | What You Should Know | 748 | ||
| 17.9 | Exercises | 748 | ||
| 18 | LINKED LISTS (AB) | 751 | ||
| 18.0 | Introduction | 751 | ||
| 18.1 | Linked Lists | 751 | ||
| 18.1.1 | Implementing a Linked List | 752 | ||
| 18.1.2 | Storing a Linked List | 755 | ||
| 18.1.3 | Searching a Linked List | 755 | ||
| 18.1.4 | Inserting Nodes in a Linked List | 762 | ||
| 18.1.5 | Removing Nodes from a Linked List | 769 | ||
| 18.2 | The PhoneList Example | 774 | ||
| 18.2.1 | The PhoneEntry Class | 777 | ||
| 18.2.2 | The SortedIterator Class | 778 | ||
| 18.2.3 | The SortedLinkedList Class | 778 | ||
| 18.2.4 | The PhoneList Class | 780 | ||
| 18.2.5 | The PhoneListExample Class | 782 | ||
| 18.2.6 | Output from Execution | 784 | ||
| 18.3 | Optimizing Linked Lists | 785 | ||
| 18.3.1 | Adding Elements to the End of the List | 785 | ||
| 18.3.2 | Doubly Linked Lists | 787 | ||
| 18.3.3 | Circularly Linked Lists | 792 | ||
| 18.4 | Hash Tables and Chaining | 793 | ||
| 18.5 | The Birthplace3 Example | 794 | ||
| 18.5.1 | The HashEntry Class | 795 | ||
| 18.5.2 | The HashIterator Class | 796 | ||
| 18.5.3 | The HashLinkedList Class | 796 | ||
| 18.5.4 | The HashTable Class | 798 | ||
| 18.5.5 | The Birthplace3 Class | 801 | ||
| 18.5.6 | Output from Execution | 803 | ||
| 18.6 | Technical Terms | 804 | ||
| 18.7 | What You Should Know | 804 | ||
| 18.8 | Exercises | 805 | ||
| 19 | TREES (AB) | 807 | ||
| 19.0 | Introduction | 807 | ||
| 19.1 | What is a Tree? | 807 | ||
| 19.2 | Trees in Computer Science | 809 | ||
| 19.2.1 | Tree Terminology | 809 | ||
| 19.3 | Implementation of Binary Trees | 811 | ||
| 19.3.1 | Algorithms Using Binary Trees | 815 | ||
| 19.4 | Tree Traversal | 820 | ||
| 19.5 | An Expression Evaluator | 822 | ||
| 19.6 | Binary Search Trees | 826 | ||
| 19.6.1 | Key/Value Data | 829 | ||
| 19.6.2 | Searching a Binary Search Tree | 830 | ||
| 19.6.3 | Printing a Binary Search Tree | 833 | ||
| 19.6.4 | Adding to a Binary Search Tree | 834 | ||
| 19.6.5 | Removing Nodes from a Binary Search Tree | 838 | ||
| 19.7 | Heapsort | 843 | ||
| 19.7.1 | Efficiency of Heap Sort | 852 | ||
| 19.7.2 | Visual Heap Sort | 853 | ||
| 19.8 | Technical Terms | 854 | ||
| 19.9 | What You Should Know | 855 | ||
| 19.10 | Exercises | 855 | ||
| 20 | DATA STRUCTURES IN THE JAVA CLASS LIBRARY (AB) | 861 | ||
| 20.0 | Introduction | 861 | ||
| 20.1 | Lists in the Java Class Library | 861 | ||
| 20.1.1 | The List Interface | 862 | ||
| 20.1.2 | The Iterator Interface | 864 | ||
| 20.1.3 | The ListIterator Interface | 869 | ||
| 20.2 | The ArrayList Class | 874 | ||
| 20.3 | The LinkedList Class | 878 | ||
| 20.4 | Sets in the Java Class Library | 881 | ||
| 20.4.1 | The Set Interface | 882 | ||
| 20.4.2 | The FindPrimes Example | 883 | ||
| 20.5 | Maps in the Java Class Library | 887 | ||
| 20.5.1 | The Map Interface | 888 | ||
| 20.5.2 | Listing the Contents of a Map | 889 | ||
| 20.5.3 | The LastNameLookup Example | 890 | ||
| 20.6 | The Librarian Program | 894 | ||
| 20.6.1 | Data Structures | 895 | ||
| 20.6.2 | The Book Class | 896 | ||
| 20.6.3 | The LibraryCard Class | 897 | ||
| 20.6.4 | The Library Class | 900 | ||
| 20.6.5 | The Librarian Class | 905 | ||
| 20.6.6 | Output from the Program | 906 | ||
| 20.7 | Technical Terms | 908 | ||
| 20.8 | What You Should Know | 908 | ||
| 20.9 | Exercises | 908 | ||
| 21 | STACKS, QUEUES, AND PRIORITY QUEUES (AB) | 911 | ||
| 21.0 | Introduction | 911 | ||
| 21.1 | Stack | 911 | ||
| 21.1.1 | The Stack Interface | 913 | ||
| 21.1.2 | The Reverser Example | 914 | ||
| 21.1.3 | The BracketMatch Example | 917 | ||
| 21.2 | Preconditions and Throwing Exceptions | 921 | ||
| 21.2.1 | Throwing Exceptions | 921 | ||
| 21.3 | Queue | 923 | ||
| 21.3.1 | The Queue Interface | 925 | ||
| 21.3.2 | The Echoer Example | 926 | ||
| 21.3.3 | The BankSim Example | 928 | ||
| 21.4 | Priority Queue | 940 | ||
| 21.4.1 | The PriorityQueue Interface | 942 | ||
| 21.4.2 | The Jobs Example | 944 | ||
| 21.5 | Technical Terms | 948 | ||
| 21.6 | What You Should Know | 948 | ||
| 21.7 | Exercises | 949 | ||
| APPENDIX A: RESERVED WORDS | 951 | |||
| APPENDIX B: JAVA CLASS LIBRARY (FOR AP) | 952 | |||
| APPENDIX C: AP CLASSES | 970 | |||
| APPENDIX D: HSA CLASSES | 972 | |||
| APPENDIX E: OPERATORS | 987 | |||
| APPENDIX F: INSTALLING READY TO PROGRAM | 989 | |||
| Installation for Personal Use | 989 | |||
| Installation for Institutional Use | 991 | |||
| APPENDIX G: USING READY TO PROGRAM | 994 | |||
| APPENDIX H: USING OTHER IDES AND CLASS PATH | 1007 | |||
| Other Environments | 1007 | |||
| CLASSPATH | 1008 | |||
| Packages and CLASSPATH | 1009 | |||
| APPENDIX I: READY TO PROGRAM LIMITED LICENSE AGREEMENT | 1010 | |||
| INDEX | 1013 | |||