search for books and compare prices
Tables of Contents for Java First Contact
Chapter/Section Title
Page #
Page Count
Preface
xxv
 
Part 1 Using Objects
1
166
1 Programming & the Java Language
1
28
1.1 Programs & Programming
1
1
1.2 Algorithms
2
2
1.3 High-level Languages & Programs
4
3
1.4 A Simple Computer
7
1
1.5 Machine Code (optional)
8
5
1.6 Files & the Filing System
13
2
1.7 The World Wide Web
15
2
1.8 The Java Programming Language
17
3
1.9 Getting Started With Java
20
1
1.10 A First Java Program
21
3
1.11 The print & println Methods
24
1
1.12 How This Book Is Arranged
25
1
1.13 Key Points in Chapter 1
26
1
1.14 Exercises
27
2
2 Object Orientation
29
18
2.1 Introduction: Objects & Classes
29
3
2.2 Software Objects
32
3
2.3 More About Single Objects
35
4
2.4 An Object-Oriented Program
39
1
2.5 Types
39
3
2.6 Classes & Instances Revisited
42
3
2.7 Key Points in Chapter 2
45
1
2.8 Exercises
45
2
3 Declaring Objects & Calling Methods
47
28
3.1 Introduction
47
2
3.2 The Class Person
49
1
3.3 A Program to Manipulate a Person
50
1
3.4 The import Statement
51
1
3.5 Declaring Objects
52
4
3.6 Using Methods to Set the Attributes of Objects
56
3
3.7 Using Methods to Extract Object Attributes
59
3
3.8 Using Constants in Java
62
2
3.9 Using Objects & Methods
64
1
3.10 A Variety of Methods
65
2
3.11 Constructors Revisited
67
3
3.12 Input to a Program (optional)
70
1
3.13 Key Points in Chapter 3
71
1
3.14 Exercises
72
3
4 Selecting Among Alternatives
75
36
4.1 Reading Values From the Keyboard
75
3
4.2 More on Integer Variables
78
4
4.3 Type Checking
82
1
4.4 Making Decisions
83
4
4.5 Selection Statements in Java
87
6
4.5.1 Statements
88
2
4.5.2 Relational Operators & Boolean Expressions
90
3
4.6 The boolean Type
93
6
4.7 The Switch Statement
99
5
4.8 Testing a New Class
104
4
4.9 Key Points in Chapter 4
108
1
4.10 Exercises
109
2
5 Repetition
111
28
5.1 Repetition as a Basic Control Structure
111
2
5.2 Looping a Predetermined Number of Times--The for Statement
113
5
5.3 Looping an Indeterminate Number of Times--The while Statement
118
3
5.4 Stopping in the Middle of an Iteration
121
2
5.5 For Loops & While Loops
123
1
5.6 Nested Loops
124
5
5.7 Boolean Expressions for Loops
129
2
5.8 Testing at the End of the Loop--The do Loop
131
2
5.9 Other Java Loop Features
133
1
5.10 Key Points in Chapter 5
134
1
5.11 Exercises
135
4
6 Basic Java Data Types
139
28
6.1 Objects & Basic Data Types
139
5
6.1.1 Declaration
139
2
6.1.2 Setting a Value
141
2
6.1.3 Obtaining a Value
143
1
6.1.4 Arguments to Methods
143
1
6.2 The int Data Type
144
4
6.3 Other Whole Number Data Types in Java (optional)
148
1
6.4 Floating-point Data Types
149
2
6.5 The boolean Data Type
151
1
6.6 The char Data Type
152
2
6.7 The String Class
154
3
6.8 Methods for the String Class
157
2
6.9 Wrapper Classes (optional)
159
2
6.10 Key Points in Chapter 6
161
1
6.11 Exercises
162
5
Part 2 Writing Objects
167
128
7 A Simple Class
167
20
7.1 Introduction
167
3
7.2 Providing the Person Class
170
3
7.3 Methods for the Person Class
173
3
7.4 Actual & Formal Parameters
176
4
7.5 Modes of Parameter Passing
180
2
7.6 Return Values
182
1
7.7 Lexical Conventions Within a Class
183
1
7.8 Key Points in Chapter 7
184
1
7.9 Exercises
185
2
8 More on the Simple Class
187
30
8.1 Constructor Methods
187
3
8.2 Overloading
190
2
8.3 Class Constants
192
2
8.4 Class Variables
194
1
8.5 Private Methods
195
3
8.6 Class or Static Methods
198
1
8.7 Revisiting the Main Class
199
5
8.8 Packages & Directories
204
4
8.8.1 The import Statement
207
1
8.9 Scope & Visibility
208
4
8.9.1 Intraclass Visibility
208
4
8.9.2 Use of this
212
1
8.9.3 Interclass Visibility
212
1
8.10 Key Points in Chapter 8
212
2
8.11 Exercises
214
3
9 Arrays
217
32
9.1 Collections of Elements
217
3
9.2 Arrays of Objects
220
2
9.3 Searching an Array
222
3
9.4 Binary Search
225
1
9.5 Sorting an Array
226
6
9.6 Arrays as Arguments
232
3
9.7 Multi-dimensional Arrays
235
4
9.8 Nonrectangular Arrays (optional)
239
2
9.9 Key Points in Chapter 9
241
1
9.10 Exercises
242
7
10 Objects Within Objects
249
22
10.1 Introduction
249
1
10.2 Writing the OurDate Class
250
1
10.3 Using the OurDate Class
251
1
10.4 Objects as Parameters
252
4
10.5 Multiple References to the Same Object
256
3
10.6 Objects as Parameters & Return Values: Call by Reference
259
7
10.6.1 Changing the Contents of the Formal & Actual Parameters
262
4
10.7 Hiding References to Other Objects
266
1
10.8 Key Points in Chapter 10
267
1
10.9 Exercises
268
3
11 Putting Objects to Work
271
24
11.1 A Task Organizer Program
271
1
11.2 A Priority Queue Class
272
4
11.3 Implementing a Priority Queue With an Array
276
5
11.4 Alternative Implementations of PriorityQueue (optional)
281
2
11.5 Testing the PriorityQueue Class
283
4
11.6 Using the PriorityQueue Class
287
2
11.7 Outstanding Issues
289
2
11.8 Key Points in Chapter 11
291
1
11.9 Exercises
291
4
Part 3 Advanced Objects
295
122
12 Introduction to Inheritance
295
22
12.1 Motivation
295
7
12.1.1 Data Modeling
295
6
12.1.2 Programming
301
1
12.2 What's the Difference?
302
1
12.3 Overriding Inherited Methods
303
3
12.4 Access Rights & Subclasses
306
2
12.5 Airline Reservations: An Example
308
5
12.6 Key Points in Chapter 12
313
1
12.7 Exercises
314
2
12.8 References
316
1
13 Class & Method Polymorphism
317
22
13.1 Person & Student: An Example
317
1
13.2 Constructor Methods & Inheritance
318
2
13.2.1 Constructor Chaining
319
1
13.3 Multiple Levels of Inheritance: The Inheritance Hierarchy
320
1
13.4 The Class Object
321
2
13.5 Polymorphism
323
3
13.6 Polymorphism & Heterogeneous Collections
326
4
13.6.1 Dynamic Method Binding (Late Binding)
329
1
13.7 Calling Overridden Methods
330
2
13.8 Methods in Derived Classes
332
1
13.9 Key Points in Chapter 13
333
1
13.10 Exercises
334
5
14 Abstract Classes & Interfaces
339
20
14.1 Abstract Classes
339
5
14.2 Polymorphism
344
3
14.3 Interfaces
347
6
14.4 Key Points in Chapter 14
353
1
14.5 Exercises
354
5
15 Throwing & Catching Exceptions
359
16
15.1 Introduction
359
2
15.2 Defining a New Exception
361
1
15.3 Throwing an Exception
362
1
15.4 Catching an Exception
363
9
15.4.1 The finally Clause (optional)
369
3
15.5 Key Points in Chapter 15
372
1
15.6 Exercises
373
2
16 Graphics & the Abstract Window Toolkit
375
42
16.1 Graphical User Interfaces
375
2
16.2 A Simple Program With a Graphical Interface
377
4
16.3 Writing the Chapter 16n0 Class
381
6
16.3.1 The Constructor for the Chapter16n0 Class
382
3
16.3.2 The main Method for the Chapter16n0 Class
385
1
16.3.3 The actionPerformed Method of the Chapter16n0 Class
385
1
16.3.4 The windowClosing Method of the Chapter16n0 Class
386
1
16.4 Writing the Canvas0 Class
387
4
16.5 Writing Text on the Canvas
391
1
16.6 Animating the Simple Graphics Program
392
3
16.7 Input of Character Strings in a Graphical Interface
395
6
16.7.1 Setting Up the Picture
396
3
16.7.2 Getting a String from a TextField
399
1
16.7.3 Drawing the Thermometer
400
1
16.8 Menus, Files & Images (optional)
401
8
16.8.1 Setting Up Menus
402
4
16.8.2 Selecting a File
406
1
16.8.3 Displaying an Image
406
2
16.8.4 Tracking the Mouse
408
1
16.9 Key Points in Chapter 16
409
1
16.10 Exercises
410
7
Part 4 Advanced Java
417
118
17 Linked Data Structures
417
30
17.1 Linear & Linked Data Structures
417
3
17.2 Implementing a Priority Queue Using a Linked Data Structure
420
4
17.3 Methods for the PriorityQueue Class
424
5
17.3.1 The length Method
425
2
17.3.2 The first Method
427
1
17.3.3 The remove Method
427
2
17.4 The insert Method
429
6
17.5 Deletion From a Linked Data Structure (optional)
435
2
17.6 Doubly Linked Lists (optional)
437
3
17.7 Using Linked Data Structures
440
1
17.8 Key Points in Chapter 17
441
1
17.9 Exercises
442
5
18 Recursion & Binary Trees
447
24
18.1 An Introduction to Recursion
447
3
18.2 Solving the Towers of Hanoi Problem
450
6
18.2.1 A Recursive Solution to the Towers of Hanoi Problem
452
2
18.2.2 An Iterative Solution to the Towers of Hanoi Problem
454
2
18.3 Binary Trees
456
9
18.3.1 Searching & Updating a Binary Tree
458
3
18.3.2 Writing the Code for the Binary Tree
461
1
18.3.3 Adding a Word Occurrence to the Lexicon
462
2
18.3.4 Outputting the Lexicon Information
464
1
18.4 Key Points in Chapter 18
465
1
18.5 Exercises
466
5
19 Input & Output in Java
471
28
19.1 Introduction
471
3
19.2 The Java Classes for Input & Output
474
2
19.3 The PrintStream Class & System.out
476
4
19.3.1 Output Redirection
479
1
19.4 The BufferedReader Class & System.in
480
5
19.4.1 Tokenizing an Input Line
481
1
19.4.2 Converting Strings to Numeric Values
482
2
19.4.3 Redirection of Input
484
1
19.5 Files & File Handling
485
1
19.6 Reading & Writing Files
486
4
19.6.1 Writing to a File
487
1
19.6.2 Reading From a File
488
2
19.7 Binary Files (optional)
490
1
19.8 Random Access Files (optional)
491
1
19.9 Accessing Other Computers (optional)
492
1
19.10 Key Points in Chapter 19
493
2
19.11 Exercises
495
4
20 Creating & Using Applets
499
16
20.1 Creating Applets
499
2
20.2 Using Applets
501
3
20.3 More About Applets
504
1
20.4 A Useful Applet
505
5
20.4.1 The readIndex Method
508
1
20.4.2 The actionPerformed Method
509
1
20.5 Security Aspects of Applets
510
1
20.6 Key Points in Chapter 20
511
1
20.7 Exercises
512
3
21 Other Features of Java
515
20
21.1 Vectors & Other Java Data Structures
515
6
21.1.1 The Vector Class
515
4
21.1.2 The Hashtable Class
519
2
21.2 Strings & StringBuffers
521
1
21.3 Run-time Type Information (optional)
522
1
21.4 Threads (optional)
523
7
21.4.1 Synchronizing Threads
529
1
21.5 Key Points in Chapter 21
530
1
21.6 Exercises
531
4
Part 5 Object-Oriented Design
535
 
22 Object-Oriented Design
535
12
22.1 Introduction
535
1
22.2 The Software Life Cycle
536
2
22.2.1 Requirements
537
1
22.2.2 Design
537
1
22.2.3 Coding
537
1
22.2.4 Testing
537
1
22.2.5 Maintenance
537
1
22.3 Design
538
1
22.3.1 The Design Process
538
1
22.3.2 Functional Design
539
1
22.4 Object-Oriented Design (OOD)
539
5
22.4.1 Capturing Our Design: A Design Notation
539
2
22.4.2 Object Identification
541
3
22.5 Key Points in Chapter 22
544
1
22.6 Exercises
545
1
22.7 References
546
1
23 Case Study: Implementing the Personal Organizer (1)
547
20
23.1 Introduction
547
1
23.2 File Organization
547
8
23.2.1 Index Sequential Access
548
2
23.2.2 The Main File
550
2
23.2.3 The RandomAccessFile Class
552
1
23.2.4 The Index
553
1
23.2.5 Suitability of the Vector Class: Internal Representation of the Index
554
1
23.2.6 Suitability of the Hashtable Class: Internal Representation of the Index
554
1
23.2.7 Using the Vector Class Indirectly
555
1
23.3 The Classes in Detail
555
6
23.3.1 Filing System Considerations
558
2
23.3.2 Clientship
560
1
23.4 Moving Toward Implementation
561
4
23.4.1 The DirBase Class
561
1
23.4.2 The DirEntry Class
562
1
23.4.3 The IndexElem Class
563
1
23.4.4 The Index Class
564
1
23.5 Key Points in Chapter 23
565
1
23.6 Exercise
566
1
23.7 Reference
566
1
24 Case Study: Implementing the Personal Organizer (2)
567
32
24.1 Introduction
567
1
24.2 Implementations of DirBase, Index, IndexElem & DirEntry
567
15
24.2.1 DirEntry Class Source & Commentary
567
3
24.2.2 IndexElem Class Source & Commentary
570
2
24.2.3 Index Class Source & Commentary
572
6
24.2.4 DirBase Class Source & Commentary
578
4
24.3 Testing What We Have Done So Far
582
7
24.3.1 Using a Stream Tokenizer
583
3
24.3.2 Text-Based Interface--Intermediate Application & Testing
586
2
24.3.3 What Are We Testing?
588
1
24.4 Graphical User Interface--The Final Prototype Application
589
4
24.4.1 Testing the Graphical Interface
593
1
24.5 Using Inheritance
593
1
24.6 Key Points in Chapter 24
594
1
24.7 Exercises
595
4
25 Criteria for a Good Object-Oriented Design
599
 
25.1 Introduction
599
1
25.2 Cohesion
599
3
25.3 Coupling
602
2
25.3.1 The Law of Demeter
603
1
25.4 Clarity
604
1
25.5 Extensibility of Our Design
605
1
25.5.1 Adding an E-Mail Attribute to a Directory Entry
605
1
25.5.2 Adding a Diary Feature to the Personal Organizer
606
1
25.6 Key Points in Chapter 25
606
1
25.7 Exercises
607
1
25.8 References
607