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.

9780763704902

Programming and Problem Solving with Java

by ; ;
  • ISBN13:

    9780763704902

  • ISBN10:

    0763704903

  • Edition: CD
  • Format: Paperback
  • Copyright: 2003-04-01
  • Publisher: Jones & Bartlett Learning
  • 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: $119.95

Table of Contents

Preface xv
Introduction to Object-Oriented Programming
2(38)
Overview of Object-Oriented Programming
4(6)
What Is Programming?
4(1)
How Do We Write a Program?
5(5)
How Is Java Code Converted into a Form That a Computer Can Use?
10(4)
How Does Interpreting Code Differ from Executing It?
14(1)
How Is Compilation Related to Interpretation and Execution?
14(1)
What Kinds of Instructions Can Be Written in a Programming Language?
15(5)
Object-Oriented Programming Languages
18(2)
What's Inside the Computer?
20(2)
Problem-Solving Techniques
22(18)
Ask Questions
23(1)
Look for Things That Are Familiar
24(1)
Solve by Analogy
25(1)
Means-Ends Analysis
25(1)
Divide and Conquer
26(1)
The Building-Block Approach
27(1)
Merging Solutions
27(1)
Mental Blocks: The Fear of Starting
28(1)
Object-Oriented Problem Solving
29(1)
Case Study: Party Planning
30(3)
Summary
33(1)
Quick Check
34(2)
Exam Preparation Exercises
36(1)
Programming Warm-Up Exercises
37(1)
Programming Problems
38(1)
Case Study Follow-Up
38(2)
Java Syntax and Semantics, Classes, and Objects
40(58)
The Elements of Java Programs
42(28)
Syntax and Semantics
42(1)
Syntax Templates
42(4)
Naming Program Elements: Identifiers
46(1)
Built-in Types in Java
47(3)
Classes and Objects
50(4)
Defining Terms: Declarations
54(1)
Field Declarations
54(5)
Assignment and Expressions
59(5)
Beyond Minimalism: Adding Comments to Code
64(1)
Output
64(3)
Input
67(3)
Interactive Input and Output
70(1)
Application Construction
70(5)
Blocks
73(2)
Application Entry, Correction, and Execution
75(3)
Entering Application Code
75(2)
Compiling and Running an Application
77(1)
Finishing Up
77(1)
Classes and Methods
78(8)
User Classes
78(1)
Methods
79(4)
Case Study: Display a Name in Multiple Formats
83(3)
Testing and Debugging
86(12)
Summary
87(1)
Quick Check
88(2)
Exam Preparation Exercises
90(4)
Programming Warm-Up Exercises
94(1)
Programming Problems
95(2)
Case Study Follow-Up
97(1)
Arithmetic Expressions
98(54)
Overview of Java Data Types
100(3)
Numeric Data Types
103(3)
Integral Types
103(2)
Floating-Point Types
105(1)
Declarations for Numeric Types
106(2)
Named Constant Declarations
106(1)
Variable Declarations
107(1)
Simple Arithmetic Expressions
108(6)
Arithmetic Operators
108(4)
Increment and Decrement Operators
112(2)
Compound Arithmetic Expressions
114(6)
Precedence Rules
114(1)
Type Conversion and Type Casting
115(5)
Additional Mathematical Methods
120(2)
Value-Returning Class Methods
122(4)
Additional String Operations
126(5)
The length Method
126(1)
The indexOf Method
126(2)
The substring Method
128(2)
Converting Strings to Numeric Values
130(1)
Noninteractive Input/Output
131(1)
Applications with Multiple Class Files
131(9)
Case Study: Small Company Payroll
135(5)
Testing and Debugging
140(12)
Summary
141(1)
Quick Check
141(2)
Exam Preparation Exercises
143(3)
Programming Warm-Up Exercises
146(4)
Programming Problems
150(1)
Case Study Follow-Up
151(1)
Selection and Encapsulation
152(58)
Flow of Control
154(1)
Selection
154(1)
Conditions and Logical Expressions
154(13)
The boolean Data Type
155(1)
Logical Expressions
155(10)
Precedence of Operators
165(2)
Relational Operators with Floating-Point Types
167(1)
The if Statement
167(6)
The if-else Form
168(1)
Blocks (Compound Statements)
169(1)
The if Form
170(3)
Nested if Statements
173(4)
The Dangling else
176(1)
Encapsulation
177(2)
Abstraction
179(11)
Data and Control Abstraction
179(5)
Case Study: Warning Notices
184(6)
Testing and Debugging
190(20)
Testing Strategies
190(3)
The Test Plan
193(1)
Tests Performed Automatically During Compilation and Execution
194(3)
Summary
197(1)
Quick Check
197(2)
Exam Preparation Exercises
199(5)
Programming Warm-Up Exercises
204(2)
Programming Problems
206(3)
Case Study Follow-Up
209(1)
File Objects and Looping Statements
210(58)
File Input and Output
212(8)
Files
212(1)
Using Files
213(6)
An Example Application Using Files
219(1)
Looping
220(22)
The while Statement
221(2)
Phases of Loop Execution
223(1)
Loops Using the while Statement
223(1)
Count-Controlled Loops
223(2)
Event-Controlled Loops
225(4)
Looping Subtasks
229(4)
How to Design Loops
233(1)
Designing the Flow of Control
233(2)
Designing the Process Within the Loop
235(1)
The Loop Exit
236(1)
Nested Loops
236(1)
General Pattern
237(3)
Designing Nested Loops
240(2)
Mutable and Immutable Objects
242(10)
A Parameter-Passing Analogy
244(2)
Case Study: Average Income By Gender
246(6)
Testing and Debugging
252(16)
Loop-Testing Strategy
252(1)
Test Plans Involving Loops
252(3)
Summary
255(2)
Quick Check
257(1)
Exam Preparation Exercises
258(4)
Programming Warm-Up Exercises
262(2)
Programming Problems
264(2)
Case Study Follow-Up
266(2)
Object-Oriented Software Design and Implementation
268(56)
Software Design Strategies
270(1)
Objects and Classes Revisited
271(3)
Object-Oriented Design
274(3)
Object-Oriented Problem Solving
275(1)
Software Engineering
276(1)
The CRC Card Design Process
277(8)
Identifying the Initial Classes Through Brainstorming
277(1)
Filtering
278(2)
Determining Responsibilities
280(5)
Inheritance
285(1)
Functional Decomposition
285(4)
Writing Modules
287(2)
Object-Oriented Implementation
289(5)
Class Interface Design
289(2)
Internal Data Representation
291(1)
Responsibilities as Methods
292(2)
Packages
294(7)
Package Syntax
294(2)
Packages with Multiple Compilation Units
296(1)
Package Example
297(4)
Ethics and Responsibilities in the Computing Profession
301(13)
Software Piracy
301(1)
Privacy of Data
302(1)
Use of Computer Resources
302(2)
Case Study: Address Book
304(10)
Testing and Debugging
314(10)
Summary
315(1)
Quick Check
316(1)
Exam Preparation Exercises
317(2)
Programming Warm-Up Exercises
319(1)
Programming Problems
320(3)
Case Study Follow-Up
323(1)
Inheritance, Polymorphism, and Scope
324(50)
Inheritance
326(2)
An Analogy
326(2)
Inheritance and the Object-Oriented Design Process
328(5)
How to Read a Class Hierarchy
333(4)
Overriding
336(1)
Hiding
336(1)
Polymorphism
337(1)
Derived Class Syntax
337(2)
Scope of Access
339(7)
Internal Scope
340(2)
External Scope
342(4)
Implementing a Derived Class
346(6)
Constructors in Derived Classes
347(1)
Overloading and Method Signatures
347(2)
Accessing Overridden and Hidden Methods and Fields
349(1)
A Concrete Example
349(3)
Copy Constructors
352(2)
Output and Input of Objects
354(11)
Case Study: Extending the Address Book
359(6)
Testing and Debugging
365(9)
Summary
366(1)
Quick Check
367(1)
Exam Preparation Exercises
368(2)
Programming Warm-Up Exercises
370(2)
Programming Problem
372(1)
Case Study Follow-Up
373(1)
Event-Driven Input and Output
374(56)
Frames
376(6)
Import Classes and Declare Fields
376(1)
Instantiate Frame Objects and Specify Some of Their Properties
377(3)
Add Output to the Content Pane
380(1)
Make the Frame Visible on the Screen
380(2)
Formatting Output
382(3)
Using GridLayout for Tabular Output
382(2)
Alignment of Text Within Jlabels
384(1)
Event Handling
385(9)
Creating a Button
385(2)
Creating and Registering a Button Event Listener
387(3)
An Event-Handling Example
390(3)
Event Loops
393(1)
Entering Data Using Fields in a Frame
394(2)
Creating a Data Entry Field
396(1)
Using a Field
397(1)
Reading Data in an Event Handler
398(11)
Case Study: Totaling Rainfall Amounts
402(7)
Handling Multiple Button Events
409(11)
Case Study: A Simple Calculator
412(8)
Testing and Debugging
420(10)
Summary
421(1)
Quick Check
421(1)
Exam Preparation Exercises
422(2)
Programming Warm-Up Exercises
424(2)
Programming Problems
426(1)
Case Study Follow-Up
426(4)
Exceptions and Additional Control Structures
430(48)
Exception-Handling Mechanism
432(6)
The try-catch-finally Statement
432(3)
Generating an Exception with throw
435(2)
Exception Classes
437(1)
Additional Control Statements
438(10)
The switch Statement
438(4)
The do Statement
442(3)
The for Statement
445(3)
Guidelines for Choosing a Looping Statement
448(1)
Additional Java Operators
448(18)
Assignment Operators and Assignment Expressions
448(2)
Increment and Decrement Operators
450(1)
Bitwise Operators
451(5)
The ?: Operator
456(1)
Operator Precedence
456(3)
Case Study: Monthly Rainfall Averages
459(7)
Testing and Debugging
466(12)
Summary
467(1)
Quick Check
468(2)
Exam Preparation Exercises
470(2)
Programming Warm-Up Exercises
472(2)
Programming Problems
474(3)
Case Study Follow-Up
477(1)
One-Dimensional Arrays
478(44)
Atomic Data Types
480(1)
Composite Data Types
481(2)
One-Dimensional Arrays
483(10)
Declaring an Array
486(1)
Creating an Array
486(2)
Declaring and Creating an Array with an Initializer List
488(1)
Accessing Individual Components
488(2)
Out-of-Bounds Array Indexes
490(1)
Aggregate Array Operations
491(2)
Examples of Declaring and Processing Arrays
493(4)
Occupancy Rates
493(1)
Sales Figures
494(1)
Character Counts
495(2)
Arrays of Objects
497(3)
Arrays of Strings
497(3)
Arrays of User-Defined Objects
500(1)
Arrays and Methods
500(1)
Special Kinds of Array Processing
501(9)
Partial (or Sub) Array Processing
501(1)
Indexes with Semantic Content
501(1)
Case Study: Grading True/False Tests
502(8)
Testing and Debugging
510(12)
Summary
513(1)
Quick Check
513(1)
Exam Preparation Exercises
514(3)
Programming Warm-Up Exercises
517(1)
Programming Problems
518(3)
Case Study Follow-Up
521(1)
Array-Based Lists
522(58)
Lists
524(1)
List Class
525(14)
Brainstorming the List Class
525(1)
CRC Card
526(1)
Refining the Responsibilities
526(5)
Internal Data Representation
531(1)
Responsibility Algorithms for Class List
531(5)
Test Plan
536(3)
Sorting the List Items
539(4)
Responsibility Algorithms for Class ListWithSort
539(2)
Class ListWithSort
541(2)
Sorted List
543(5)
Brainstorming the Sorted List
543(2)
Responsibility Algorithms for Class SortedList
545(3)
Test Plan
548(1)
The List Class Hierarchy and Abstract Classes
548(2)
Searching
550(9)
Sequential Search
550(2)
Binary Search
552(7)
Generic Lists
559(12)
Comparable Interface
559(2)
Polymorphism
561(1)
Case Study: Merging Address Books
562(9)
Testing and Debugging
571(9)
Summary
572(1)
Quick Check
573(1)
Exam Preparation Exercises
574(1)
Programming Warm-Up Exercises
575(2)
Programming Problems
577(1)
Case Study Follow-Up
578(2)
Multidimensional Arrays and Numeric Computation
580(54)
Two-Dimensional Arrays
582(4)
Array Declaration and Instantiation
582(1)
Accessing Individual Components
583(1)
Using Initializer Lists
584(2)
Processing Two-Dimensional Arrays
586(5)
Sum the Rows
587(1)
Sum to Columns
588(1)
Initialize the Array
589(1)
Two-Dimensional Arrays and Methods
590(1)
Multidimensional Arrays
591(1)
Vector Class
592(1)
Floating-Point Numbers
592(10)
Representation of Floating-Point Numbers
592(3)
Arithmetic with Floating-Point Numbers
595(1)
Implementation of Floating-Point Numbers in the Computer
596(6)
Decimal Format Type
602(17)
Case Study: Matrix Manipulation
605(14)
Testing and Debugging
619(15)
Summary
621(1)
Quick Check
621(2)
Exam Preparation Exercises
623(5)
Programming Warm-Up Exercises
628(2)
Programming Problems
630(3)
Case Study Follow-Up
633(1)
Recursion
634(24)
What Is Recursion?
636(2)
Power Function Definition
636(1)
Power Function Implementation
637(1)
More Examples with Simple Variables
638(10)
Calculating the Factorial Function
638(3)
Converting Decimal Integers to Binary Numbers
641(3)
Towers of Hanoi
644(4)
Recursive Algorithms with Structured Variables
648(3)
Printing the Values in an Array
648(3)
Binary Search
651(1)
Recursion or Iteration?
651(1)
Testing and Debugging
652(6)
Summary
653(1)
Quick Check
653(1)
Exam Preparation Exercises
654(1)
Programming Warm-Up Exercises
655(3)
Applets
658(24)
What Is an Applet?
660(1)
How Do You Write an Applet?
661(6)
Factorial
661(3)
Calculator
664(3)
How Do You Run an Applet?
667(9)
Web Browsers
667(1)
HTML
668(1)
Factorial
669(1)
Calculator
670(1)
Case Study: Searching Experiments
671(5)
Testing and Debugging
676(6)
Summary
677(1)
Quick Check
677(1)
Exam Preparation Exercises
677(1)
Programming Warm-Up Exercises
678(1)
Programming Problems
679(1)
Case Study Follow-Up
680(2)
Appendixes 682(16)
Glossary 698(8)
Answers 706(38)
Index 744

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