COS 126 Errata, Spring 2006

Intro to Programming, p. 117, Program 2.1.1
Printed: Program 1.4.1
Fixed: Program 1.3.6
Reported by Kevin Kung, 20-Feb-06.

Intro to Programming, p. 126
Printed: Program 2.4.2
Fixed: Program 2.1.2
Reported by Kevin Kung, 20-Feb-06.

Intro to Programming, p. 131
Printed: Program 1.4.2
Fixed: Program 1.4.1
Reported by Kevin Kung, 20-Feb-06.

Intro to Programming, p. 146, Exercise 2.1.9
Printed: phi((x - mu) / sigma^2)
Fixed: phi((x - mu) / sigma) / sigma
Reported by Kevin Wayne, 25-Feb-06.

Intro to Programming, p. 165, Program 2.2.4
Printed: sum / i
Fixed: sum / N
Reported by Kevin Kung, 22-Feb-06.

Intro to Programming, p. 166
Printed: java Markov 2 < example.txt
Fixed: nexts line should be 3 3
Reported by Bob Sedgewick, 05-Feb-06.

Intro to Programming, p. 167
Printed: \\
Fixed: //
Reported by Kevin Wayne, 22-Feb-06.

Intro to Programming, p. 170
Printed: Draw
Fixed: don't need Draw anymore
Reported by Kevin Wayne, 05-Feb-06.

Intro to Programming, p. 180, Program 2.2.9
Printed: StdDraw.spot(x, y);
Fixed: StdDraw.point(x, y);
Reported by Kevin Wayne, 24-Feb-06.

Intro to Programming, p. 185
Printed: Program 2.2.7
Fixed: Program 2.2.10
Reported by Jae-Young Lee, 20-Feb-06.

Intro to Programming, p. 189
Printed: sin(2*Pi*t /440)
Fixed: sin(2*Pi*t *440)
Reported by Kevin Kung, 26-Feb-06.

Intro to Programming, p. 211, Program 2.3.2
Printed: moves(n, !left)
Fixed: moves(n-1, !left)
Reported by Kevin Wayne, 13-Feb-06.

Intro to Programming, p. 211, Program 2.3.2
Printed: 0 1 0 2 0 1 0
Fixed: 1 2 1 3 1 2 1
Reported by Kevin Kung, 27-Feb-06.

Intro to Programming, p. 215, Program 2.3.3
Printed: Incorrect program and output.
Fixed: See GrayCode.java for the corrected code and output.
Reported by Kevin Kung, 28-Feb-06.

Intro to Programming, p. 226
Printed: BrownianBridge
Fixed: Brownian
Reported by Kevin Wayne, 06-Feb-06.

Intro to Programming, p. 243, Program 2.4.1
Printed: int p = Double.parseDouble();
Fixed: double p = Double.parseDouble();
Reported by Kevin Wayne, 23-Feb-06.

Intro to Programming, p. 250
Printed: StdDraw.filledSquare(N-i, j, d));
Fixed: StdDraw.filledSquare(N-i, j, d);
Reported by Kevin Wayne, 23-Feb-06.

Intro to Programming, p. 252
Printed: setInkColor
Fixed: setPenColor
Reported by Kevin Wayne, 06-Feb-06.

Intro to Programming, p. 252, Program 2.4.4
Printed: boolean[]
Fixed: boolean[][]
Reported by Kevin Wayne, 06-Feb-06.

Intro to Programming, p. 256-257
Printed: threshold value about 0.417
Fixed: threshold value about 0.407
Reported by Kevin Wayne, 02-Feb-06.