Академический Документы
Профессиональный Документы
Культура Документы
Chapters I - XV
I
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
II
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
4
7
8
9
11
15
18
20
41
42
49
52
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
54
55
55
57
60
61
63
69
72
76
82
Introduction to Java
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
Introduction . . . . . . . . .
Getting Started with Java . . . .
A Visit to the United Nations . . .
Java Bytecode . . . . . . . .
Applications and Applets . . . .
Using Java Software . . . . . .
Text Output With print & println . .
Program Compile Errors . . . . .
Program Comments . . . . . .
The Responsible Use of Computers
Summary . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Table of Contents
.
.
.
.
.
Chapters 1-15
Introduction . . . . . . .
Declaring Variables . . . .
The int Data Type . . . . .
The double Data Type . .
Arithmetic Shortcut Notations .
The char & String Data Types .
The boolean Data Type . . .
Declaring Constants . . . .
Documenting Your Programs .
Mathematical Precedence . .
Summary . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
86
86
92
94
96
98
101
102
103
107
109
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
112
113
116
125
126
128
131
142
150
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
154
161
162
167
169
174
178
192
201
208
222
229
Introduction . . . . . . . .
Java Program Components . .
Using the Math Class . . . .
Introduction to the Expo Class .
Review of Cartesian Graphics .
Introduction to Computer Graphics
Drawing Methods . . . . . .
Fill Methods and Graphics Colors
Summary . . . . . . . . .
V Control Structures
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
Keyboard Input . . . . . . .
Introduction to Control Structures
Types of Control Structures . .
Relational operators . . . . .
One-Way Selection . . . . .
Two-Way Selection . . . . .
Multi-Way Selection . . . . .
Fixed Repetition . . . . . .
Conditional Repetition . . . .
Nested Control Structures . . .
Control Structures and Graphics .
Summary . . . . . . . . .
10-06-14
Introduction . . . . . . . . . .
Classes and Objects . . . . . . .
Using Object Methods . . . . . .
Using the DecimalFormat Class . . .
Displaying Graphics Characters . . .
Drawing Polygons . . . . . . . .
Drawing Regular Polygons . . . . .
Creating New Colors . . . . . . .
Creating Random Numbers . . . .
Using Random Numbers with Graphics
Summary . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
232
233
238
245
250
254
262
266
269
271
282
Introduction . . . . . . . . . . . . . . .
The Math Class Revisited . . . . . . . . . .
Modular programming and Creating Simple Methods
Graphics Programs with Multiple Methods . . . .
Creating a Big Graphics Program Step-By-Step . .
Void Methods with a Single Parameter . . . . .
Void Methods with Multiple Parameters . . . . .
Return Methods with a Single Parameter . . . .
Return Methods with Multiple Parameters . . . .
Introduction to Program Design . . . . . . . .
Creating Methods with Other Methods . . . . .
Summary . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
284
286
288
298
315
323
328
336
338
343
361
369
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
372
372
375
379
396
Introduction . . . . . . .
OOP, a Gentle First Exposure.
Encapsulation and Reliability .
The Bank Class From Scratch
Method Summary . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Table of Contents
Chapters 1-15
X
10.1
10.2
10.3
10.4
10.5
10.6
10.7
10.8
10.9
XI
11.1
11.2
11.3
11.4
11.5
11.6
Introduction . . . . . . .
Is-A and Has-A Relationships .
Superclass and Subclass . .
Private and Protected Access .
Multi-Level Inheritance . . .
The Fish Class Case Study .
Summary
. . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
404
404
407
412
415
418
425
Introduction . . . . . . . . . . .
What is a Boolean Statement . . . . .
Boolean Operators. . . . . . . . .
Venn Diagrams & Boolean Algebra . . .
The Boolean Data Type . . . . . . .
Compound Conditions . . . . . . .
Ranges. . . . . . . . . . . . .
Protecting Against User Data Entry Errors
Summary . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
428
429
430
433
443
448
456
459
461
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
464
471
473
481
485
493
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
496
498
500
501
508
513
515
523
Boolean Logic
Introduction . . . . . .
Constructing String Objects
String Concatenation . . .
Working with Substrings . .
Changing Strings . . . .
Converting Strings . . . .
Comparing Strings . . . .
Summary . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
10-06-14
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
XIII Algorithms
13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8
Introduction . . . . . . . .
Using Java's Random Class . .
The List Case Study . . . . .
Improving Input and Output . .
The Linear Search . . . . . .
The Bubble Sort . . . . . .
Understanding the Binary Search
Summary . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
526
527
540
545
550
559
569
572
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
574
576
577
586
589
590
596
610
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
XV
15.1
15.2
15.3
15.4
15.5
15.6
15.7
15.8
15.9
15.10
Introduction . . . . . . . .
Different Types of Files . . . .
Reading In Text Files . . . . .
Writing Out Text Files . . . . .
Reading & Writing Simultaneously
Appending an Existing File . . .
Using Text Files with Graphics. .
Summary . . . . . . . . .
.
.
.
.
Intermediate Graphics
Introduction . . . . . . . . . . .
Using Mouse Events . . . . . . . .
Importing Images . . . . . . . . .
Fixing Image Issues . . . . . . . .
New Features with the Deluxe Expo Class
Multi-Page Output . . . . . . . . .
Creating a Simple Draw Program . . .
Creating Clickable Areas in the Applet. .
Computer Animation . . . . . . . .
The Last Word . . . . . . . . . .
Table of Contents
.
.
612
612
621
627
647
657
660
677
689
704
Chapters 1-15
10-06-14