|
|
|
1 | (38) |
|
|
|
2 | (1) |
|
|
|
3 | (7) |
|
Computing units of measure |
|
|
5 | (1) |
|
Buying a personal computer |
|
|
6 | (4) |
|
|
|
10 | (4) |
|
|
|
11 | (3) |
|
|
|
14 | (4) |
|
|
|
14 | (1) |
|
|
|
15 | (3) |
|
|
|
18 | (5) |
|
Software engineering principles |
|
|
20 | (3) |
|
|
|
23 | (3) |
|
|
|
26 | (8) |
|
|
|
29 | (1) |
|
Find out as much as you can |
|
|
30 | (1) |
|
Break complex problems into subproblems |
|
|
31 | (1) |
|
Reuse and expect future reuse |
|
|
32 | (1) |
|
|
|
33 | (1) |
|
|
|
34 | (1) |
|
|
|
35 | (1) |
|
|
|
35 | (3) |
|
|
|
38 | (1) |
|
|
|
39 | (66) |
|
|
|
40 | (12) |
|
Commenting and whitespace |
|
|
41 | (2) |
|
Classes, keywords, and identifiers |
|
|
43 | (1) |
|
|
|
44 | (2) |
|
Selecting methods print() and printIn() |
|
|
46 | (3) |
|
|
|
49 | (3) |
|
|
|
52 | (9) |
|
|
|
54 | (2) |
|
|
|
56 | (1) |
|
|
|
57 | (4) |
|
|
|
61 | (6) |
|
|
|
61 | (2) |
|
|
|
63 | (2) |
|
|
|
65 | (2) |
|
|
|
67 | (6) |
|
Unary and binary operators |
|
|
68 | (1) |
|
|
|
69 | (2) |
|
Widening and narrowing operand conversion |
|
|
71 | (2) |
|
Overflow, underflow, and exceptions |
|
|
73 | (1) |
|
|
|
73 | (5) |
|
Primitive variable assignment |
|
|
78 | (8) |
|
|
|
81 | (1) |
|
Assignment precedence and associativity |
|
|
82 | (1) |
|
|
|
83 | (3) |
|
Case study --- averaging five numbers |
|
|
86 | (3) |
|
|
|
89 | (2) |
|
|
|
91 | (2) |
|
|
|
93 | (5) |
|
Programming project --- you |
|
|
98 | (3) |
|
Programming project --- training zone |
|
|
101 | (2) |
|
|
|
103 | (2) |
|
|
|
105 | (34) |
|
|
|
106 | (1) |
|
|
|
107 | (4) |
|
|
|
108 | (2) |
|
Null and uninitialized references |
|
|
110 | (1) |
|
|
|
111 | (2) |
|
|
|
113 | (2) |
|
String operations and methods |
|
|
115 | (8) |
|
Case study --- date translation |
|
|
123 | (6) |
|
|
|
129 | (1) |
|
|
|
130 | (1) |
|
|
|
130 | (4) |
|
Programming project --- harvester |
|
|
134 | (2) |
|
|
|
136 | (3) |
|
|
|
139 | (40) |
|
|
|
140 | (2) |
|
|
|
142 | (12) |
|
Instance variables and attributes |
|
|
144 | (2) |
|
|
|
146 | (1) |
|
|
|
147 | (4) |
|
|
|
151 | (3) |
|
Methods with parameters and return values |
|
|
154 | (12) |
|
|
|
166 | (1) |
|
|
|
167 | (2) |
|
|
|
169 | (1) |
|
|
|
169 | (3) |
|
Programming project---rationality |
|
|
172 | (3) |
|
|
|
175 | (4) |
|
|
|
179 | (62) |
|
Boolean algebra and truth tables |
|
|
180 | (2) |
|
|
|
181 | (1) |
|
|
|
182 | (5) |
|
Boolean equality and ordering operators |
|
|
183 | (3) |
|
Operator precedence revisited |
|
|
186 | (1) |
|
|
|
187 | (5) |
|
|
|
191 | (1) |
|
|
|
192 | (3) |
|
|
|
195 | (3) |
|
|
|
198 | (4) |
|
Testing objects for equality |
|
|
202 | (4) |
|
|
|
206 | (7) |
|
Case study --- checksum validation |
|
|
213 | (4) |
|
|
|
217 | (9) |
|
|
|
226 | (2) |
|
|
|
228 | (2) |
|
|
|
230 | (5) |
|
Programming project --- medical assistant |
|
|
235 | (4) |
|
|
|
239 | (2) |
|
|
|
241 | (48) |
|
|
|
242 | (10) |
|
|
|
252 | (6) |
|
|
|
256 | (1) |
|
Computing the number of combinations |
|
|
256 | (2) |
|
|
|
258 | (4) |
|
|
|
262 | (3) |
|
|
|
265 | (7) |
|
Case study --- data set analysis |
|
|
272 | (8) |
|
|
|
280 | (1) |
|
|
|
281 | (1) |
|
|
|
282 | (3) |
|
Programming project --- four hobo problem |
|
|
285 | (2) |
|
|
|
287 | (2) |
|
GUI Interlude I: GUI-Based Programming |
|
|
289 | (230) |
|
GUI and event-driven programming |
|
|
290 | (3) |
|
|
|
293 | (15) |
|
Class constants and instance variables |
|
|
298 | (3) |
|
|
|
301 | (3) |
|
Event handling and actionPerformed() |
|
|
304 | (2) |
|
|
|
306 | (2) |
|
|
|
308 | (1) |
|
|
|
309 | (1) |
|
|
|
310 | (1) |
|
Programming project --- training zones |
|
|
311 | (2) |
|
|
|
313 | (2) |
|
Programming with Methods and Classes |
|
|
315 | (66) |
|
|
|
316 | (6) |
|
|
|
322 | (9) |
|
|
|
331 | (3) |
|
Inherited methods and overriding |
|
|
334 | (6) |
|
|
|
340 | (4) |
|
|
|
340 | (1) |
|
|
|
341 | (3) |
|
|
|
344 | (7) |
|
|
|
351 | (7) |
|
|
|
358 | (3) |
|
|
|
361 | (2) |
|
|
|
363 | (2) |
|
|
|
365 | (8) |
|
Programming project --- automobile financing |
|
|
373 | (4) |
|
|
|
377 | (4) |
|
|
|
381 | (78) |
|
|
|
382 | (1) |
|
|
|
382 | (11) |
|
|
|
383 | (2) |
|
|
|
385 | (3) |
|
|
|
388 | (1) |
|
|
|
389 | (1) |
|
|
|
390 | (3) |
|
|
|
393 | (3) |
|
|
|
396 | (5) |
|
|
|
396 | (2) |
|
Searching for a key value |
|
|
398 | (2) |
|
Searching for the minimum value |
|
|
400 | (1) |
|
|
|
401 | (12) |
|
Sequential and binary search |
|
|
402 | (3) |
|
|
|
405 | (3) |
|
|
|
408 | (3) |
|
|
|
411 | (1) |
|
Increasing representation capacity |
|
|
411 | (2) |
|
|
|
413 | (4) |
|
|
|
414 | (2) |
|
Quality of selectionSort() |
|
|
416 | (1) |
|
|
|
417 | (2) |
|
|
|
419 | (5) |
|
|
|
422 | (2) |
|
|
|
424 | (1) |
|
|
|
425 | (5) |
|
|
|
430 | (4) |
|
Case study --- pie charts |
|
|
434 | (9) |
|
|
|
443 | (2) |
|
|
|
445 | (1) |
|
|
|
446 | (6) |
|
Programming project --- matrices |
|
|
452 | (1) |
|
|
|
453 | (6) |
|
Inheritance and Polymorphism |
|
|
459 | (60) |
|
|
|
460 | (13) |
|
|
|
462 | (7) |
|
|
|
469 | (4) |
|
|
|
473 | (2) |
|
|
|
475 | (11) |
|
|
|
476 | (3) |
|
|
|
479 | (3) |
|
|
|
482 | (2) |
|
|
|
484 | (1) |
|
|
|
485 | (1) |
|
|
|
486 | (4) |
|
|
|
490 | (5) |
|
Case study --- preparing the aquarium |
|
|
495 | (11) |
|
|
|
506 | (2) |
|
|
|
508 | (2) |
|
|
|
510 | (4) |
|
Programming project --- change maker |
|
|
514 | (3) |
|
|
|
517 | (2) |
|
GUI Interlude 2: GUI-Based Programming |
|
|
519 | (162) |
|
Case study --- personality typing |
|
|
520 | (15) |
|
|
|
520 | (15) |
|
Programming project --- Smiley guessing game |
|
|
535 | (16) |
|
|
|
551 | (22) |
|
|
|
552 | (9) |
|
Finally and the command type |
|
|
561 | (2) |
|
Creating and throwing exceptions |
|
|
563 | (5) |
|
|
|
568 | (1) |
|
|
|
569 | (1) |
|
|
|
569 | (1) |
|
Programming project --- a second look |
|
|
570 | (1) |
|
|
|
570 | (3) |
|
Recursive Problem Solving |
|
|
573 | (36) |
|
|
|
574 | (7) |
|
Fibonacci numbers and squares |
|
|
577 | (4) |
|
Case study --- recursive binary search |
|
|
581 | (6) |
|
|
|
587 | (5) |
|
|
|
592 | (1) |
|
Recursion versus iteration |
|
|
593 | (2) |
|
Case study --- string permutation |
|
|
595 | (6) |
|
|
|
601 | (1) |
|
|
|
601 | (1) |
|
|
|
602 | (3) |
|
Programming project --- Sierpinski fractal |
|
|
605 | (3) |
|
|
|
608 | (1) |
|
|
|
609 | (36) |
|
|
|
610 | (14) |
|
|
|
612 | (3) |
|
|
|
615 | (4) |
|
|
|
619 | (5) |
|
|
|
624 | (2) |
|
|
|
626 | (6) |
|
Case study --- swimming fish |
|
|
632 | (7) |
|
|
|
639 | (1) |
|
|
|
640 | (1) |
|
|
|
640 | (2) |
|
Programming project --- better fish |
|
|
642 | (2) |
|
|
|
644 | (1) |
|
|
|
645 | (36) |
|
|
|
646 | (21) |
|
|
|
647 | (9) |
|
|
|
656 | (3) |
|
|
|
659 | (3) |
|
Black-box and white-box testing |
|
|
662 | (4) |
|
Integration and system testing |
|
|
666 | (1) |
|
|
|
667 | (8) |
|
|
|
667 | (4) |
|
Debugging tips and techniques |
|
|
671 | (4) |
|
|
|
675 | (1) |
|
|
|
675 | (1) |
|
|
|
676 | (1) |
|
|
|
676 | (1) |
|
Programming project --- getList() |
|
|
677 | (2) |
|
|
|
679 | (2) |
|
Appendix A: Tables and Operators |
|
|
681 | (6) |
|
|
|
682 | (1) |
|
|
|
683 | (1) |
|
|
|
683 | (4) |
|
Appendix B: Number representation |
|
|
687 | (4) |
|
Binary number representation |
|
|
688 | (1) |
|
Two's-complement representation |
|
|
689 | (2) |
|
Appendix C: Formatted I/O |
|
|
691 | (6) |
|
|
|
692 | (1) |
|
|
|
692 | (5) |
|
|
|
697 | (12) |
|
|
|
698 | (2) |
|
|
|
700 | (5) |
|
|
|
700 | (1) |
|
|
|
701 | (1) |
|
|
|
701 | (1) |
|
|
|
701 | (1) |
|
|
|
701 | (4) |
|
|
|
705 | (2) |
|
|
|
707 | (1) |
|
|
|
708 | (1) |
|
Appendix E: Standard Java Packages |
|
|
709 | (194) |
| Index |
|
903 | |