Chap |
Page |
Line |
Change |
2 |
21 |
Fig
2.1 |
For the program above,
the rings should be in the top-left corner of the screen. |
2 |
35 |
21 |
replace println; by println(
); |
2 |
45 |
5 |
Get a revised version of
this program off the web. There are changes related to long, int and the
use of Math.round which make for a better program. |
2 |
51 |
-5 |
replace 4 - 3/4 - 3 by
4 - 3/4 - 2 |
2 |
51 |
5 |
replace 7f by 7 |
2 |
52 |
4 |
replace 2.6 by 2.5 |
2 |
52 |
15 and 17 |
delete these questions
as they do not coincide with the answers |
3 |
54 |
-1 |
replace dates by locales |
3 |
75 |
-5 |
replace 10% by 20% |
3 |
77 |
-16 |
replace h by (long) h |
3 |
81 |
Fig 3.4 |
round off corners on component
symbol (see p306) |
3 |
81 |
Fig 3.4 |
remove small arc in listener
symbol (see p306) |
3 |
83 |
13-17 |
add System.out. to start
of each line |
3 |
85 |
22 |
Change program so depth
goes to 5 (line 22) and row loop starts at 2 (line -11) |
3 |
92 |
19 |
replace 2.7 by 3.3 |
4 |
99 |
3 |
replace line by System.out.println(Text.writeDouble(x,
10, 4)); |
4 |
99 |
6 |
The numbers
are incorrectly lined up. Run a program to see the correct output. |
4 |
122 |
-10 |
replace create by open |
4 |
123 |
5 |
replace Text.open (system.in);
by open (); |
5 |
133 |
5 |
replace and by && |
5 |
133 |
4 |
move the } to the end of
the extract and re-indent the lines up to line 8 |
5 |
137 |
-12 |
replace
whole line by System.out.print (Text.writeDouble(amount/factor,8,3)); |
5 |
141 |
-11 |
The do-while construct
must have { } |
5 |
142 |
-23 |
The do-while construct
must have { } |
5 |
145 |
14,16 |
replace Invalid by Error
in |
5 |
148 |
17 |
insert = new Random after
dice |
6 |
169 |
-8
to -2 |
The stars are incorrectly
lined up. See first edition for lineup, or run the program to get the correct
output. |
6 |
178 |
10 |
move all the numbers to
underneath Right Hand |
6 |
179 |
-12 |
replace ascending by descending |
6 |
187 |
Fig 6.12 |
remove arrow head between
student and Students |
6 |
192 |
-1 |
replace airtable by curtable |
7 |
195 |
-7 |
replace entire line by
study = bigOne.toCharArray ( ) ; |
7 |
196 |
1 |
replace pop by bang |
7 |
200 |
form line 4 |
remove italic ) |
7 |
208 |
-13 |
replace local by locale |
7 |
210 |
12 |
remove to |
7 |
211 |
-1 |
replace 5 by 4 |
7 |
222 |
2 |
replace array of names
by array of 3 names |
7 |
229 |
Fig 8.1 |
reverse the Vs on both
inherit lines |
8 |
230 |
10 to 14 |
replace the paragraph by:
protected If we want members to be visible only to subclasses in a package
(those that inherit) then we change the modifier to protected. In this
way we could tighten up on a in A so that only B could see it. Protected
members are therefore just like default ones, and the accessibility does
not extend outside a package, even in the case of inheritance. |
8 |
230 |
-5 |
replace package by public |
8 |
230 |
-5
to -4 |
replace class in A or in
E by package by E |
8 |
231 |
18 |
replace int by public int |
8 |
232 |
-10 |
replace private e; by private
int e; |
8 |
232 |
-3 |
replace line by objB.bPrivate
= 2; |
8 |
232 |
-5 |
replace Obj.b by ObjB.bPackage |
8 |
232 |
-21 |
replace int b by int bPackage |
8 |
233 |
6 |
replace b by bPackage |
8 |
237 |
-14 |
replace Chapter 10 by Chapter
11 |
8 |
252 |
3 |
add new statement: prev
= now; |
8 |
252 |
5 |
delete |
8 |
264 |
-7 |
replace CoffeeStock by
CoffeeShop |
8 |
265 |
-5 |
replace Coffee by Coffee2 |
8 |
265 |
-4 |
replace addbefore by insert |
9 |
269 |
Fig 9.2 |
remove first ) after "Elephant" |
10 |
295 |
Fig 10.1 |
add a reversed V for inheritance
above PopUpMenu (same as for Menu) |
10 |
306 |
in form |
all 5 words in capitals
should be in small bold |
11 |
320 |
in first form |
replace PRIVATE by private
in bold |
12 |
340 |
18 |
replace contents of ( )
by ("This is a warning", 0, 0); |
12 |
359 |
Fig 12.7 |
reverse V on the inherit
line between MouseHandler and MouseAdapter |
13 |
381 |
Fig 13.2 |
The line from
Thread stops at the SetOfLights. It does not extend to run |
13 |
381 |
Fig 13.2 |
line between draw and Graphics
has an arrow at Graphics |
13 |
381 |
Fig 13.2 |
reverse V on the inherit
line between Thread and SetOfLights |
14 |
406 |
17 |
replace new by new URL |
14 |
419 |
Fig 14.3 |
line between
Thread and ChatHandler stops at Thread symbol not start symbol |
14 |
423 |
Fig 14.4 |
line from Database
to Web server should be from Java class to Web server |
14 |
423 |
Fig 14.4 |
line between Java class
and Database has arrow both ends |
14 |
431 |
-14 |
replace about by about
Grid Bag |
14 |
435 |
Fig 14.9 |
reverse V in
inherit line between Thread and Monitor, and set V on Monitor symbol, not
on run symbol |
15 |
442 |
17 |
replace new a[n] by new
item [n] |
15 |
447 |
3 |
replace sort by search |
Ans |
480 |
12 |
replace 100 by 3 |
Ans |
480 |
13 |
replace 1 by 2 |
Ans |
481 |
-3 |
replace > by < |
Ans |
481 |
-4 |
replace > by < |
Ans |
486 |
1 |
replace 1 by a positive
number |
Ans |
486 |
-5 |
replace method by class |
Ans |
488 |
diagram |
Move the hoizontal
line to below newBatchIn and shorter the vertical lines accordingly. Change
the symbol for BatchStock to have rounded corners and add a line from it
to Batch (no arrowhead). |
Ans |
488 |
1 |
replace Coffee by Coffee2 |
Ans |
491 |
-15 |
put brackets around chosen
i.e. (chosen) |