Starting Out with Java: Early Objects / Edition 4

Paperback (Print)
Rent
Rent from BN.com
$33.76
(Save 75%)
Est. Return Date: 11/01/2014
Buy New
Buy New from BN.com
$109.38
Used and New from Other Sellers
Used and New from Other Sellers
from $60.80
Usually ships in 1-2 business days
(Save 55%)
Other sellers (Paperback)
  • All (12) from $60.80   
  • New (3) from $107.00   
  • Used (9) from $60.80   

Overview

Starting Out with Java: Early Objects is intended for use in the Java programming course. It is also suitable for all readers interested in an introduction to the Java programming language. ¿

¿

Tony Gaddis’s accessible, step-by-step presentation helps beginning students understand the important details necessary to become skilled programmers at an introductory level. Gaddis motivates the study of both programming skills and the Java programming language by presenting all the details needed to understand the “how” and the “why”—but never losing sight of the fact that most beginners struggle with this material. His approach is both gradual and highly accessible, ensuring that students understand the logic behind developing high-quality programs.

In Starting Out with Java: Early Objects , Gaddis looks at objects—the fundamentals of classes and methods—before covering procedural programming. As with all Gaddis texts, clear and easy-to-read code listings, concise and practical real-world examples, and an abundance of exercises appear in every chapter.

¿

MyProgrammingLab for Starting Out with Java: Early Objects is a total learning package. MyProgrammingLab is an online homework, tutorial, and assessment program that truly engages students in learning. It helps students better prepare for class, quizzes, and exams–resulting in better performance in the course–and provides educators a dynamic set of tools for gauging individual and class progress.

¿

Teaching and Learning Experience

This program presents a better teaching and learning experience—for you and your students.

  • Personalize Learning with MyProgrammingLab: Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming.
  • Enhance Learning with the Gaddis Approach: Gaddis’s accessible approach features clear and easy-to-read code listings, concise real-world examples, and exercises in every chapter.
  • Keep Your Course Current: Content is refreshed to provide the most up-to-date information on new technologies for your course.
  • Support Instructors and Students: Student and instructor resources are available to expand on the topics presented in the text.¿

Note: You are purchasing a standalone product; MyProgrammingLab does not come packaged with this content. If you would like to purchase both the physical text and MyProgrammingLab¿ search for ISBN-10: 0133796302/ISBN-13: 9780133796308. That package includes ISBN-10: 0133776743/ISBN-13: 9780133776744 and ISBN-10:0133831779 /ISBN-13: 9780133831771.

MyProgrammingLab is not a self-paced technology and should only be purchased when required by an instructor.

¿

Read More Show Less

Product Details

  • ISBN-13: 9780132164764
  • Publisher: Addison-Wesley
  • Publication date: 12/8/2010
  • Series: Gaddis Series
  • Edition number: 4
  • Pages: 1128
  • Sales rank: 285,749
  • Product dimensions: 8.00 (w) x 9.90 (h) x 1.70 (d)

Meet the Author

Tony Gaddis is the principal author of the Starting Out With series of textbooks. Tony has nearly two decades of experience teaching computer science courses, primarily at Haywood Community College. He is a highly acclaimed instructor who was previously selected as the North Carolina Community College “Teacher of the Year” and has received the Teaching Excellence award from the National Institute for Staff and Organizational Development. The Starting Out With series includes introductory books covering C++, Java™, Microsoft® Visual Basic®, Microsoft® C#®, Python®, Programming Logic and Design, Alice, and App Inventor, all published by Pearson. More information about all these books can be found at www.pearsonhighered.com/gaddisbooks.

Read More Show Less

Table of Contents

Preface xv

Chapter 1 Introduction to Computers and Java 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Why Program? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Computer Systems: Hardware and Software . . . . . . . . . . . . . . . . . . . . . 2

1.4 Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.5 What Is a Program Made of? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.6 The Programming Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.7 Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Review Questions and Exercises 24

Programming Challenge 28

Chapter 2 Java Fundamentals 31

2.1 The Parts of a Java Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

2.2 The System.out.print and System.out.println Methods, and the

Java API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.3 Variables and Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

2.4 Primitive Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

2.5 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

2.6 Combined Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

2.7 Conversion between Primitive Data Types . . . . . . . . . . . . . . . . . . . . . . 70

2.8 Creating Named Constants with final . . . . . . . . . . . . . . . . . . . . . . . . 74

2.9 The String Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

2.10 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

2.11 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

2.12 Programming Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

2.13 Reading Keyboard Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

2.14 Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

2.15 The System.out.printf Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

2.16 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Review Questions and Exercises 118

Programming Challenges 123

Chapter 3 A First Look at Classes and Objects 129

3.1 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

3.2 More about Passing Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

3.3 Instance Fields and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

3.4 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

3.5 A BankAccount Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

3.6 Classes, Variables, and Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

3.7 Packages and import Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

3.8 Focus on Object-Oriented Design: Finding the Classes

and Their Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

3.9 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Review Questions and Exercises 183

Programming Challenges 187

Chapter 4 Decision Structures 193

4.1 The if Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

4.2 The if-else Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

4.3 The Payroll Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

4.4 Nested if Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

4.5 The if-else-if Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

4.6 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

4.7 Comparing String Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

4.8 More about Variable Declaration and Scope . . . . . . . . . . . . . . . . . . . 235

4.9 The Conditional Operator (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . 237

4.10 The switch Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

4.11 Formatting Numbers with the DecimalFormat Class . . . . . . . . . . . . . . 248

4.12 Focus on Problem Solving: The SalesCommission Class . . . . . . . . . . . . 254

4.13 Generating Random Numbers with the Random Class . . . . . . . . . . . . . 261

4.14 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

Review Questions and Exercises 268

Programming Challenges 273

Chapter 5 Loops and Files 279

5.1 The Increment and Decrement Operators . . . . . . . . . . . . . . . . . . . . . 279

5.2 The while Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

5.3 Using the while Loop for Input Validation . . . . . . . . . . . . . . . . . . . . . 290

5.4 The do-while Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

5.5 The for Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

5.6 Running Totals and Sentinel Values . . . . . . . . . . . . . . . . . . . . . . . . . . 307

5.7 Nested Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

5.8 The break and continue Statements . . . . . . . . . . . . . . . . . . . . . . . . . . 320

5.9 Deciding Which Loop to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

5.10 Introduction to File Input and Output . . . . . . . . . . . . . . . . . . . . . . . . 321

5.11 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

Review Questions and Exercises 342

Programming Challenges 348

Chapter 6 A Second Look at Classes and Objects 357

6.1 Static Class Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

6.2 Overloaded Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

6.3 Overloaded Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369

6.4 Passing Objects as Arguments to Methods . . . . . . . . . . . . . . . . . . . . . 376

6.5 Returning Objects from Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389

6.6 The toString Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

6.7 Writing an equals Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

6.8 Methods That Copy Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

6.9 Aggregation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

6.10 The this Reference Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

6.11 Inner Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

6.12 Enumerated Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

6.13 Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

6.14 Focus on Object-Oriented Design: Class Collaboration . . . . . . . . . . . 431

6.15 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

Review Questions and Exercises 436

Programming Challenges 441

Chapter 7 Arrays and the ArrayList Class 449

7.1 Introduction to Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

7.2 Processing Array Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

7.3 Passing Arrays as Arguments to Methods . . . . . . . . . . . . . . . . . . . . . . 472

7.4 Some Useful Array Algorithms and Operations . . . . . . . . . . . . . . . . . . 476

7.5 Returning Arrays from Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

7.6 String Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490

7.7 Arrays of Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

7.8 The Sequential Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

7.9 The Selection Sort and the Binary Search Algorithms . . . . . . . . . . . . . 501

7.10 Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

7.11 Arrays with Three or More Dimensions . . . . . . . . . . . . . . . . . . . . . . . 521

7.12 Command-Line Arguments and Variable-Length Argument Lists . . . . 522

7.13 The ArrayList Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

7.14 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534

Review Questions and Exercises 535

Programming Challenges 539

Chapter 8 Text Processing and Wrapper Classes 547

8.1 Introduction to Wrapper Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547

8.2 Character Testing and Conversion with the Character Class . . . . . . . 548

8.3 More about String Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

8.4 The StringBuilder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569

8.5 Tokenizing Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

8.6 Wrapper Classes for the Numeric Data Types . . . . . . . . . . . . . . . . . . . 587

8.7 Focus on Problem Solving: The TestScoreReader Class . . . . . . . . . . . . 591

8.8 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

Review Questions and Exercises 595

Programming Challenges 599

Chapter 9 Inheritance 605

9.1 What Is Inheritance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605

9.2 Calling the Superclass Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . 616

9.3 Overriding Superclass Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

9.4 Protected Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632

9.5 Classes That Inherit from Subclasses . . . . . . . . . . . . . . . . . . . . . . . . . . 639

9.6 The Object Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644

9.7 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646

9.8 Abstract Classes and Abstract Methods . . . . . . . . . . . . . . . . . . . . . . . 651

9.9 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657

9.10 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668

Review Questions and Exercises 669

Programming Challenges 675

Chapter 10 Exceptions and Advanced File I/O 681

10.1 Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681

10.2 Throwing Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704

10.3 Advanced Topics: Binary Files, Random Access Files, and Object

Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712

10.4 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728

Review Questions and Exercises 729

Programming Challenges 735

Chapter 11 GUI Applications–Part 1 739

11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739

11.2 Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

11.3 Creating Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753

11.4 Layout Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780

11.5 Radio Buttons and Check Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797

11.6 Borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810

11.7 Focus on Problem Solving: Extending the JPanel Class . . . . . . . . . . . 812

11.8 Splash Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826

11.9 Using Console Output to Debug a GUI Application . . . . . . . . . . . . . . 827

11.10 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831

Review Questions and Exercises 831

Programming Challenges 836

Chapter 12 GUI Applications–Part 2 841

12.1 Read-Only Text Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841

12.2 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842

12.3 Combo Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859

12.4 Displaying Images in Labels and Buttons . . . . . . . . . . . . . . . . . . . . . . 865

12.5 Mnemonics and Tool Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871

12.6 File Choosers and Color Choosers . . . . . . . . . . . . . . . . . . . . . . . . . . . 873

12.7 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877

12.8 More about Text Components: Text Areas and Fonts . . . . . . . . . . . . . 886

12.9 Sliders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891

12.10 Look and Feel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 895

12.11 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897

Review Questions and Exercises 898

Programming Challenges 903

Chapter 13 Applets and More 909

13.1 Introduction to Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909

13.2 A Brief Introduction to HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911

13.3 Creating Applets with Swing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921

13.4 Using AWT for Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929

13.5 Drawing Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934

13.6 Handling Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954

13.7 Timer Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965

13.8 Playing Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969

13.9 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974

Review Questions and Exercises 974

Programming Challenges 980

Chapter 14 Creating GUI Applications with JavaFX 983

14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983

14.2 Scene Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985

14.3 Using Scene Builder to Create JavaFX Applications . . . . . . . . . . . . . . . 987

14.4 Writing the Application Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001

14.5 RadioButtons and CheckBoxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1011

14.6 Displaying Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025

14.7 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030

Review Questions and Exercises 1030

Programming Challenges 1034

Chapter 15 Recursion 1039

15.1 Introduction to Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039

15.2 Solving Problems with Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . 1042

15.3 Examples of Recursive Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046

15.4 A Recursive Binary Search Method . . . . . . . . . . . . . . . . . . . . . . . . . . 1053

15.5 The Towers of Hanoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056

15.6 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1060

Review Questions and Exercises 1061

Programming Challenges 1064

Chapter 16 Databases 1067

16.1 Introduction to Database Management Systems . . . . . . . . . . . . . . . 1067

16.2 Tables, Rows, and Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073

16.3 Introduction to the SQL SELECT Statement . . . . . . . . . . . . . . . . . . . . 1077

16.4 Inserting Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098

16.5 Updating and Deleting Existing Rows . . . . . . . . . . . . . . . . . . . . . . . 1101

16.6 Creating and Deleting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1110

16.7 Creating a New Database with JDBC . . . . . . . . . . . . . . . . . . . . . . . . 1114

16.8 Scrollable Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1115

16.9 Result Set Meta Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1117

16.10 Displaying Query Results in a JTable . . . . . . . . . . . . . . . . . . . . . . . . 1120

16.11 Relational Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1131

16.12 Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1152

16.13 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154

Review Questions and Exercises 1155

Programming Challenges 1160

Appendix A Getting Started with Alice 2 1163

Index 1189

Credits 1205

Available on the book’s online resource page at

www.pearsonhighered.com/gaddis

Appendix B The ASCII/Unicode Characters

Appendix C Operator Precedence and Associativity

Appendix D Java Key Words

Appendix E Installing the JDK and JDK Documentation

Appendix F Using the javadoc Utility

Appendix G More about the Math Class

Appendix H Packages

Appendix I Working with Records and Random-Access Files

Appendix J Installing Java DB

Appendix K The QuickSort Algorithm

Appendix L Answers to Checkpoints Questions

Appendix M Answers to Odd-Numbered Review Questions

Case Study 1 The Amortization Class

Case Study 2 The PinTester Class

Case Study 3 Parallel Arrays

Case Study 4 The SerialNumber Class

Case Study 5 A Simple Text Editor Application

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)