did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781576760741

Computing with Java Alternate

by
  • ISBN13:

    9781576760741

  • ISBN10:

    157676074X

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2005-09-28
  • Publisher: Addison-Wesley
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $158.20
We're Sorry.
No Options Available at This Time.

Summary

Gittleman's easy to follow book covers almost everything you need to know about Java. Topics covered include software engineering, object-oriented programming, event-driven programming and basic Java constructs.This book is designed for readers with no knowledge of Java, and no prior computing background.

Table of Contents

Preface xi
Computing with Java
1(32)
Introduction to Computing
2(4)
Hardware
2(1)
Software
2(1)
Imaginary Processor ABC
3(1)
Imaginary Processor XYZ
3(1)
High-Level Languages
3(1)
Compilers
4(1)
Interpreters
4(1)
Networks
5(1)
Overview of Java
6(2)
History
6(1)
Java's Features
6(1)
How Java Works
7(1)
Running Java Programs and Applets
8(7)
Editing, Compiling, and Running a Java Application
9(2)
Editing, Compiling, and Running a Java Applet
11(2)
A Graphical Applet
13(2)
Program-Driven vs. Event-Driven Applications
15(3)
The Character Mode
15(1)
The Graphical User Interface (GUI)
16(2)
Procedural vs. Object-Oriented Programming
18(3)
Procedural Programming
18(1)
Object-Oriented Programming
19(2)
A First Look at Everything: A User Interface Example
21(1)
An Introduction to Object-oriented Design
21(12)
Objects
23(1)
Object-Oriented Design
24(1)
A Definition
24(1)
Use Cases and Scenarios
25(1)
Scenarios for an ATM system
26(2)
Classification
28(1)
The Unified Modeling Language
28(5)
Programming with Objects
33(48)
Names
35(1)
Object Behavior
35(1)
Identifiers
35(1)
Keywords
35(1)
The Character Set
35(1)
Objects and Classes
36(6)
Simulating a Vending Machine
36(1)
Classes
36(1)
Variables and State
37(1)
Integer Variables
37(1)
Constructors and Identity
38(1)
Methods and Behavior
39(1)
A First Look at Packages
40(2)
Using Objects
42(10)
Creating Objects
42(1)
Reference Variables
43(1)
Invoking Behavior
44(1)
A Class for Testing
45(1)
Local Variables
45(1)
Output
46(1)
Using a Package
46(2)
Classpath
48(1)
A Message Dialog
49(3)
Arithmetic Expressions
52(11)
Precedence of Arithmetic Operators
55(2)
Combining Assignment and Arithmetic
57(2)
Increment and Decrement Operators
59(2)
Running a Test in a Package
61(2)
Parameters and Input
63(8)
Passing by Value
64(2)
An Input Dialog
66(5)
Getting Started with Applets and Events
71(10)
Objects
71(1)
Graphics Mode
71(1)
Applets
72(2)
Events
74(7)
Software Engineering with Control Structures
81(56)
Relational Operators and Expressions
83(3)
If and If-Else Statements
86(13)
The If Statement
86(3)
Control Flow
89(1)
The If-Else Statement
90(2)
Blocks
92(7)
The Type Double
99(8)
Scientific Notation
99(1)
Double Values
100(1)
Output
101(1)
Input and Formatted Output
102(3)
Mixed-Type Expressions
105(2)
Program Design with the While Loop
107(12)
Repetition
107(2)
Planning Programs using Pseudocode
109(5)
Loop Termination
114(1)
Finding the Maximum
115(4)
Debugging
119(3)
Getting Started with Applets: Drawing Shapes
122(15)
Graphics Drawing
123(4)
Drawing Relative to the Screen
127(10)
More Control Structures and Types
137(68)
Conditional AND, Conditional OR, and Logical Complement
139(8)
Conditional AND
139(1)
Conditional OR
140(1)
Logical Complement
141(2)
Operator Precedence
143(3)
Combining AND with OR
146(1)
Nested Ifs and the Switch Statement
147(11)
Nested If Statements
147(1)
Pairing Else with If
148(4)
The Switch Statement
152(6)
The For and Do-While Loops
158(9)
The For Statement
158(2)
String Tokenizer
160(3)
A Little Extra
163(1)
The Do-While Statement
163(4)
Additional Primitive Types
167(7)
The Char Type
167(2)
The Long Type
169(4)
The Byte, Short, and Float Types
173(1)
Using the Math Library
174(8)
Powers and Roots
175(1)
Maximum, Minimum, and Absolute Value
175(1)
Floor and Ceiling
176(1)
Pi and e
176(1)
Random Numbers
177(5)
Solving Problems with Java: An Iterative Development Cycle
182(23)
Defining the Problem
182(1)
Toward a Solution
183(3)
Toward a Solution: Second Iteration -- Pseudocode, Program, Test
186(5)
Completing the Java Code: Third Iteration---Pseudocode, Program, Test
191(2)
Testing the Java Code
193(12)
Object-Oriented Design and Programming
205(44)
Strings
206(11)
Values vs. References
212(3)
Comparing Strings
215(2)
Developing Java Classes
217(15)
The Structure of the BankAccount Class
217(1)
Instance Variables
218(1)
Instance Methods
219(1)
Constructors
220(2)
Using BankAccount Objects
222(1)
Creating Objects
222(2)
Making an Object Behave
224(2)
Method Overloading
226(1)
Class Variables and Methods
227(5)
The QuickFood Example
232(5)
Class Diagrams
232(1)
Sequence Diagrams
232(5)
Object Composition
237(12)
Event-Driven Programming
249(36)
The World Wide Web and Applets
251(5)
Protocols
251(1)
Clients and Servers
251(1)
The URL
251(1)
HTML
252(4)
Paint Events
256(4)
Responding to Paint Events
257(3)
Drawing Text
260(5)
Fonts
260(1)
Initializing an Applet
261(1)
Font Metrics
262(3)
Using Color
265(4)
Creating Colors
265(2)
3D Rectangles
267(2)
Interfaces
269(4)
Declaring an Interface
269(2)
Implementing an Interface
271(2)
Event Listeners
273(4)
A First Look at Inheritance and the AWT
277(8)
The Component Class
277(1)
Introducing Inheritance
278(1)
The Container Class
278(7)
User Interfaces
285(54)
Using a Layout
288(5)
The Component Hierarchy
288(1)
Adding Buttons to a Container
289(1)
Flow Layout
289(2)
Drawing on a Canvas
291(2)
Button and TextField
293(11)
The Java Event Model and Action Events
293(1)
Making Buttons Work
294(1)
Using Labels
295(4)
Number Formatting
299(1)
Wrapper Classes
300(1)
Entering Data in Text Fields
301(3)
Checkbox and Choice
304(8)
Inner Classes
304(1)
Checkbox and Choice with a Button
305(4)
Checkbox and Choice Item Events
309(3)
Border and Grid Layouts
312(6)
The Border Layout
312(3)
Panels
315(1)
The Grid Layout
316(2)
List and TextArea
318(5)
List
318(1)
TextArea
318(1)
StringBuffer
319(4)
Gridbag Layout
323(16)
Default GridBag Constraints
324(1)
Setting Weight and Fill
325(1)
Anchoring and Internal Padding
326(2)
Insets
328(1)
Positioning Constraints
329(1)
The Form Applet
330(9)
Arrays
339(60)
Using Arrays
341(6)
Changing an Array
344(3)
Reference versus Value Again
347(8)
Creating an Array
349(6)
Passing Array Arguments and Returning Arrays
355(9)
Passing an Array Argument: The display Method
356(2)
Returning an Array: The readIntArray Method
358(1)
Changing an Array: The reverse Method
358(2)
An Example: Using Methods to Name Operations
360(4)
An Example: Simulating Rolls of the Dice
364(3)
Arrays of Arrays
367(3)
Solving Problems with Java: Insertion Sort
370(11)
Defining the Problem
370(2)
Toward a Solution: Developing the Pseudocode
372(3)
Toward a Solution: Alternatives
375(1)
Completing the Java Code
375(3)
Testing the Code
378(3)
A GUI for Insertion Sorting
381(18)
Defining the Problem
381(1)
Designing a Solution: The Exploratory Process
381(1)
Designing a Solution: Making a Chart
382(2)
Designing a Solution: Sorting
384(2)
Designing a Solution: The User Interface
386(2)
Completing the Java Code: Making the User Interface Work
388(4)
Testing the Code
392(7)
Inheritance
399(58)
Subclasses
400(11)
Classification Revisited
400(1)
Class Hierarchies
400(1)
Constructing a Subclass
401(3)
Adding State and Behavior to a Subclass
404(2)
Overriding Behavior
406(4)
The Object Class
410(1)
Polymorphism
411(9)
Polymorphic Operations
412(1)
Compile-time and Run-time Types
412(4)
The BankAccount Hierarchy
416(4)
Abstract Classes
420(8)
Declaring an Abstract Class
420(1)
Polymorphism and Abstract Classes
421(1)
A Shape Class
421(3)
Line and Circle
424(4)
Modifiers and Access
428(10)
A Second Look at Packages
428(2)
Classpath
430(1)
Class (and Interface) Visibility
430(1)
Data Field and Method Visibility
431(1)
Access to Data Fields
431(2)
Access to Methods
433(5)
Object-Oriented Design with Use Cases and Scenarios
438(19)
Defining the Problem
438(1)
Object-Oriented Design---Developing Scenarios
438(1)
Object-Oriented Design---Assigning Responsibilities
439(1)
Object-Oriented Design---Defining the Classes
440(1)
Completing the Java Code
441(8)
Testing the Code
449(8)
Window, Mouse, and Key Events
457(50)
Closing Windows
458(7)
Frames
459(1)
Window Events and WindowListener
459(2)
Adapter Classes
461(1)
WindowAdapter
462(3)
Applets <-- --> Standalone Applications
465(7)
Applets to Applications
465(2)
Console Application to GUI Application
467(4)
Standalone Application to Applet
471(1)
Using the Mouse
472(8)
Mouse Events
472(1)
MouseListener and MouseMotionListener
472(4)
Moving the Mouse
476(2)
MouseAdapter
478(2)
Using the Keyboard
480(5)
Focus
480(1)
Key Events
481(1)
KeyListener
481(4)
Solving Problems with Java: Drawing the Tangram Puzzle
485(7)
Defining the Problem
485(2)
Designing a Solution: Starting with One Polygon
487(1)
Designing a Solution: Solving a Simpler Problem
488(2)
Completing the Java Code
490(1)
Testing the Code
491(1)
Solving Problems with Java: Tangrams with the Mouse and Keys
492(15)
Defining the Problem
492(1)
Designing a Solution: Solving a Subproblem---Rotating a Polygon
492(3)
Completing the Java Code
495(4)
Testing the Code
499(8)
Exception Handling and Input/Output
507(42)
Program Arguments and Applet Parameters
508(5)
Program Arguments
508(2)
Applet Parameters
510(3)
Exception Handling
513(8)
Exception Classes
514(1)
The Array Index Out of Bounds Exception
514(5)
The Number Format Exception
519(2)
Text File Input and Output
521(11)
Reading from a File
522(1)
Reading Lines and Fields
523(4)
Writing to a File
527(2)
Reading an Integer
529(3)
Binary and Object Input and Output
532(17)
The File Class
532(1)
Reading and Writing Bytes
533(3)
Reading and Writing Primitive Types
536(2)
Random Access Files
538(1)
Reading and Writing Objects
539(10)
Swing Components
549(38)
Starting to Swing
550(8)
The Swing Classes
550(1)
Converting an AWT Applet to Swing
550(4)
Text Components and Labels
554(1)
A Swing Application with Look and Feel Demo
554(4)
Images and Buttons
558(6)
Images
558(1)
Buttons
559(3)
Automatic Double Buffering
562(2)
Lists and Toggle Buttons
564(7)
Lists
564(1)
Scroll Panes
564(1)
Checkboxes
565(3)
Radio Buttons
568(1)
Combo Boxes
568(3)
Menus and Dialogs
571(7)
Menus
571(1)
Dialogs
571(7)
Tabs and Tables
578(9)
Tabbed Panes
578(2)
Tables
580(7)
Data Structures
587(40)
Recursion: Searching and Sorting
588(9)
Binary Search
591(3)
Merge Sort
594(3)
Linked Lists
597(5)
Stacks and Queues
602(10)
Stacks
602(6)
Queues
608(4)
Vectors and Enumerations
612(6)
Hash Tables
618(9)
Collections
627(38)
The Collection Interfaces and Classes
628(7)
The Collection Interface
628(1)
Sets
629(2)
Iterators
631(4)
Lists
635(7)
Implementations
636(6)
Maps
642(8)
Implementations
643(7)
Comparisons and Ordering
650(8)
Inheriting From Object
650(2)
Overriding Object Methods
652(2)
The Comparable Interface
654(2)
Sorted Sets and Maps
656(2)
Algorithms
658(7)
Multimedia and Networking
665(46)
Introduction to Threads
666(5)
The Thread Class
666(3)
The Runnable Interface
669(2)
Animation
671(9)
Images
680(7)
Double Buffering
683(2)
Using Swing
685(2)
Sound
687(3)
The Java Media Framework
690(4)
Concurrent Programming
694(17)
An Example without Synchronization
694(3)
Synchronization
697(2)
Communication
699(3)
Deadlock
702(9)
Networking
711(42)
Using a URL to Connect
712(5)
The Uniform Resource Locator (URL)
712(1)
Connecting from an Applet
712(2)
Connecting from a Standalone Application
714(3)
Protocols with a URL Connection
717(8)
The Hypertext Transfer Protocol (HTTP)
717(2)
Using a URL Connection
719(6)
Clients and Servers Using Sockets
725(8)
Server Ports
725(1)
A Client-Server Example
726(3)
A Request Header Server
729(4)
Browsers and Web Servers
733(9)
A Very Simple Browser
733(2)
A Very Simple Web Server
735(3)
A Threaded Web Server
738(4)
Remote Method Invocation (RMI)
742(11)
Distributed Computing: The RMI Solution
742(2)
The Interface
744(1)
The Server
745(2)
The Client
747(6)
Java Database Connectivity (JDBC)
753(54)
Database Tables and SQL Queries
754(7)
Relational Database Tables
754(2)
Structured Query Language (SQL)
756(5)
Connecting to a Database
761(10)
Database and Application Servers
761(1)
A JDBC Driver
762(1)
Creating an ODBC Data Source
762(2)
Connecting from Java
764(3)
Building the Database
767(4)
Retrieving Information
771(5)
Viewing Query Results
771(1)
SELECT Statement Options
771(5)
Metadata and Aggregate Functions
776(7)
Database Metadata
776(1)
Result Set Metadata
777(1)
Aggregate Functions
778(5)
Prepared Statements and Transactions
783(7)
Using Prepared Statements
783(2)
Transaction Processing
785(5)
A GUI for Database Queries
790(17)
The List Component
794(13)
Servlets and JavaServer Pages™
807(38)
A First Servlet
808(4)
Servlets with the JSWDK or JRun
808(1)
Generic Servlets
809(2)
Using the Web Server
811(1)
HTML Forms
812(7)
GET Requests
812(2)
POST requests
814(5)
Server-Side Includes and Servlet Chaining
819(8)
Server-Side Includes
819(4)
Servlet Chaining
823(4)
Three-tiered Architectures
827(4)
Using a Database in a Three-tiered Architecture
827(4)
Session Tracking
831(4)
JavaServer Pages (JSP)
835(10)
Getting Started with JSP
835(2)
A JSP Response to a Form
837(2)
JSP and JavaBeans Components
839(6)
Java Beans
845(36)
Building with Beans
846(5)
Starting the BeanBox
847(1)
Building an Applet with Beans
847(4)
Bound and Constrained Properties
851(4)
Simple Properties
852(1)
Bound Properties
852(1)
Constrained Properties
853(2)
Writing and Packaging a Bean
855(10)
A Simple Bean
855(1)
JAR Files
856(2)
A Bean with a Bound Property
858(2)
Smiley Bean
860(1)
Anonymous Inner Classes
861(4)
Using BeanInfo
865(7)
What Is BeanInfo?
865(1)
Friendly Bean
866(2)
BeanInfo for Friendly
868(3)
Packaging Friendly
871(1)
Programming with Beans
872(9)
Using Beans in an Applet
872(3)
Customizing Beans
875(6)
XML (Extensible Markup Language)
881(40)
XML and Information
882(6)
The Limitations of HTML
882(1)
XML Syntax
883(1)
A Document Type Definition
884(2)
Valid Documents
886(2)
SAX (Simple API for XML) Processing
888(7)
Using a SAX Parser
888(5)
Using a Validating Parser
893(2)
DOM (Document Object Model) Processing
895(6)
Building a DOM Tree from an XML File
896(2)
Checking for Well-Formed and Valid Documents
898(1)
Building a DOM Tree from Data
899(2)
XSLT (Extensible Stylesheet Language for Transformations)
901(10)
Stylesheets
901(4)
A Stylesheet for the Author Document
905(3)
Using a Stylesheet
908(3)
SOAP (Simple Object Access Protocol)
911(10)
A SOAP Message
911(3)
Calling a Method with Arguments
914(3)
Using the SOAP API
917(4)
Appendix A---Binary and Hexadecimal Numbers 921(4)
Appendix B---Bitwise and Shift Operators 925(4)
Appendix C---Operator Precedence Table 929(2)
Appendix D---The ASCII Character Set 931(2)
Appendix E---Using Java in Various Environments 933(6)
Appendix F---Javadoc 939(4)
Appendix G---Listing of Packages, Classes and Methods 943(48)
Answers to Selected Exercises 991(24)
Index 1015

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program