Errata

  1. Section 4.2.1, page 64: Third line from the bottom should read "this property is an integer..." rather than "this property is a integer..."

  2. Section 5.2.4, page 110: The variable labeled room in Figure 5.4 should be labeled location.

  3. Section 5.3.1, page 123: The method main in CounterTest declares a variable named interface. interface is a key word and cannot be the name of a variable.

  4. Section 8.3.2, page 191: Method getChoice should invoke readInt, not getInt.

        private void getChoice () {
        	input.readInt();
    
  5. Section 8.3.2, page 194: Method getChoice should invoke readInt, not getInt.

        private void getChoice () {
        	input.readInt();
    
  6. Section 12.2, page 275: The ensure: is missing from the specification of isEmpty. It should appear before the line
        this.isEmpty() == (this.size() == 0)
    
  7. Section 13.2.3, page 313: Method sort is missing the declaration of the boolean variable done.

  8. Section 13.3, page 316: itemIndex is simply an identifier and not a keyword. It should not appear in bold face near mid page.

  9. Section 13.3.1, page 318: Method indexOf is missing the declaration of the int variable i.

  10. Section 13.4, page 322: The third paragraph should read:
    Now in the loop, low is only modified by being assigned mid + 1, and high is only modified by being assigned mid - 1. Thus (1) implies...
  11. Section 13.4, page 324: Comment on the statement that low equals high + 1. (Note: this is not an erratum.) The while condition guarantees that low > high when the loop terminates. If low > high+1, then the loop invariant tells us
        list.get(high+1) < item
        list.get(high+1) >= item
    
    which is not possible if we have an order.

  12. Section 17.3, page 423: Class QuickSorter should implement the interface Sorter, not extend it.

  13. Section 17.3, page 429: The declaration of i in method partition should read:

        int i;     // index of the next item of list
    
  14. Section 17.3, page 429: Semicolon is missing after the invocation of the method interchange near the bottom of the page:

        interchange(list,pi,i);
    
  15. Section 19.2.2, page 473: Figure 19.10 is not correct. It should show a simple JFrame, similar to that shown in Figure 19.13.

  16. Section 19.4.1, page 487: Second sentence of the third paragraph should read "we must cast the result..." rather than "we must coerce the result..."

  17. Section 19.5.6, page 498: "DISPOSE" is misspelled on the last line of this section.

  18. Section 20.2.6, page 529: Class RTLogger should have a method for closing the log file:

        /**
         * Close the log file.
         */
        public void close () {
            logFile.close();
        }
    
  19. Section 21.4, page 540: The reference to Table 21.1 near the middle of the page should be to Table 21.2:

    "To get some idea of the implications, Table 21.2..."

  20. Section 21.5.2, page 550: Recursive invocations should be to method maxSublistSum, not maxSubList:

        maxLeftSum = maxSublistSum(list, first, mid);
        maxRightSum = maxSublistSum(list, mid+1, last);
    
  21. Section 22.2, page 566: Method toString is missing its return statement:

        return s;
    
  22. Section 22.3, page 576: Method clone is missing a closing brace.

  23. Section 23.1.1, page 589: The method add is missing a void specifier:

        public void add (int i, Object obj) {


Fred Hosch
Last modified: Thu Sep 2 12:23:12 CDT 2004