Starting Out with Java: From Control Structures through Objects (5e)

Tony Gaddis, Haywood Community College
Title Starting Out with Java: From Control Structures through Objects
Edition 5th
ISBN 9780132855839
ISBN 10 0132855836
Published 16/02/2012
Published by Pearson Higher Ed USA
Pages 1152
Format Paperback
In stock
 
Total Price $104.95 Add to Cart
Description
In Starting Out with Java: From Control Structures through Objects, Gaddis covers procedural programming–control structures and methods–before introducing object-oriented 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, Pearson's new online homework and assessment tool, is available with this edition.
Table of contents
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 21
Programming Challenge 25

Chapter 2 Java Fundamentals 27
2.1 The Parts of a Java Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2 The print and println Methods, and the Java API . . . . . . . . . . . . . . . 33
2.3 Variables and Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.4 Primitive Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.5 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.6 Combined Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.7 Conversion between Primitive Data Types . . . . . . . . . . . . . . . . . . . . . 65
2.8 Creating Named Constants with final . . . . . . . . . . . . . . . . . . . . . . . . 69
2.9 The String Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.10 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.11 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.12 Programming Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
2.13 Reading Keyboard Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
2.14 Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
2.15 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Review Questions and Exercises 100
Programming Challenges 105

Chapter 3 Decision Structures 109
3.1 The if Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
3.2 The if-else Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.3 Nested if Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
3.4 The if-else-if Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
3.5 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.6 Comparing String Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
3.7 More about Variable Declaration and Scope . . . . . . . . . . . . . . . . . . . 149
3.8 The Conditional Operator (Optional) . . . . . . . . . . . . . . . . . . . . . . . . 150
3.9 The switch Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
3.10 The System.out.printf Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
3.11 Creating Objects with the DecimalFormat Class . . . . . . . . . . . . . . . . . 174
3.12 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Review Questions and Exercises 182
Programming Challenges 187

Chapter 4 Loops and Files 193
4.1 The Increment and Decrement Operators . . . . . . . . . . . . . . . . . . . . 193
4.2 The while Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
4.3 Using the while Loop for Input Validation . . . . . . . . . . . . . . . . . . . . 204
4.4 The do-while Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
4.5 The for Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
4.6 Running Totals and Sentinel Values . . . . . . . . . . . . . . . . . . . . . . . . . . 220
4.7 Nested Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
4.8 The break and continue Statements (Optional) . . . . . . . . . . . . . . . 233
4.9 Deciding Which Loop to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
4.10 Introduction to File Input and Output . . . . . . . . . . . . . . . . . . . . . . . 234
4.11 Generating Random Numbers with the Random Class . . . . . . . . . . . . 253
4.12 Common Errors to Avoid 259
Review Questions and Exercises 260
Programming Challenges 266

Chapter 5 Methods 273
5.1 Introduction to Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
5.2 Passing Arguments to a Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
5.3 More about Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
5.4 Returning a Value from a Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
5.5 Problem Solving with Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
5.6 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Review Questions and Exercises 311
Programming Challenges 316

Chapter 6 A First Look at Classes 323
6.1 Objects and Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
6.2 Writing a Simple Class, Step by Step . . . . . . . . . . . . . . . . . . . . . . . . 330
6.3 Instance Fields and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
6.4 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
6.5 Passing Objects as Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
6.6 Overloading Methods and Constructors . . . . . . . . . . . . . . . . . . . . . . 376
6.7 Scope of Instance Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
6.8 Packages and import Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
6.9 Focus on Object-Oriented Design: Finding the Classes
and Their Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
6.10 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Review Questions and Exercises 395
Programming Challenges 400

Chapter 7 Arrays and the ArrayList Class 407
7.1 Introduction to Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
7.2 Processing Array Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
7.3 Passing Arrays As Arguments to Methods . . . . . . . . . . . . . . . . . . . . . 426
7.4 Some Useful Array Algorithms and Operations . . . . . . . . . . . . . . . . . 430
7.5 Returning Arrays from Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
7.6 String Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
7.7 Arrays of Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
7.8 The Sequential Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
7.9 Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
7.10 Arrays with Three or More Dimensions . . . . . . . . . . . . . . . . . . . . . . . 466
7.11 The Selection Sort and the Binary Search Algorithms . . . . . . . . . . . . 467
7.12 Command-Line Arguments and Variable-Length Argument Lists . . . 472
7.13 The ArrayList Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
7.14 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
Review Questions and Exercises 485
Programming Challenges 490

Chapter 8 A Second Look at Classes and Objects 497
8.1 Static Class Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
8.2 Passing Objects As Arguments to Methods . . . . . . . . . . . . . . . . . . . . 504
8.3 Returning Objects from Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
8.4 The toString Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
8.5 Writing an equals Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
8.6 Methods That Copy Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
8.7 Aggregation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
8.8 The this Reference Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
8.9 Enumerated Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
8.10 Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
8.11 Focus on Object-Oriented Design: Class Collaboration . . . . . . . . . . . 546
8.12 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Review Questions and Exercises 551
Programming Challenges 555

Chapter 9 Text Processing and More about Wrapper Classes 561
9.1 Introduction to Wrapper Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
9.2 Character Testing and Conversion with the Character Class . . . . . . . 562
9.3 More String Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
9.4 The StringBuilder Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
9.5 Tokenizing Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
9.6 Wrapper Classes for the Numeric Data Types . . . . . . . . . . . . . . . . . . 603
9.7 Focus on Problem Solving: The TestScoreReader Class . . . . . . . . . . . 606
9.8 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
Review Questions and Exercises 610
Programming Challenges 614

Chapter 10 Inheritance 619
10.1 What Is Inheritance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
10.2 Calling the Superclass Constructor . . . . . . . . . . . . . . . . . . . . . . . . . 632
10.3 Overriding Superclass Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
10.4 Protected Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
10.5 Chains of Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
10.6 The Object Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
10.7 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
10.8 Abstract Classes and Abstract Methods . . . . . . . . . . . . . . . . . . . . . . 668
10.9 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
10.10 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
Review Questions and Exercises 688
Programming Challenges 693

Chapter 11 Exceptions and Advanced File I/O 699
11.1 Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
11.2 Throwing Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
11.3 Advanced Topics: Binary Files, Random Access Files,
and Object Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
11.4 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746
Review Questions and Exercises 746
Programming Challenges 752

Chapter 12 A First Look at GUI Applications 755
12.1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755
12.2 Creating Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
12.3 Layout Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
12.4 Radio Buttons and Check Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804
12.5 Borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
12.6 Focus on Problem Solving: Extending Classes from JPanel . . . . 818
12.7 Splash Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830
12.8 Using Console Output to Debug a GUI Application . . . . . . . . . . . . . 831
12.9 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836
Review Questions and Exercises 836
Programming Challenges 839

Chapter 13 Advanced GUI Applications 843
13.1 The Swing and AWT Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . 843
13.2 Read-Only Text Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
13.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
13.4 Combo Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862
13.5 Displaying Images in Labels and Buttons . . . . . . . . . . . . . . . . . . . . . 868
13.6 Mnemonics and Tool Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874
13.7 File Choosers and Color Choosers . . . . . . . . . . . . . . . . . . . . . . . . . . 876
13.8 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
13.9 More about Text Components: Text Areas and Fonts . . . . . . . . . . . . 889
13.10 Sliders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
13.11 Look and Feel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
13.12 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
Review Questions and Exercises 901
Programming Challenges 906

Chapter 14 Applets and More 911
14.1 Introduction to Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
14.2 A Brief Introduction to HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913
14.3 Creating Applets with Swing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
14.4 Using AWT for Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931
14.5 Drawing Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
14.6 Handling Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
14.7 Timer Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967
14.8 Playing Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
14.9 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Review Questions and Exercises 976
Programming Challenges 982

Chapter 15 Recursion 985
15.1 Introduction to Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
15.2 Solving Problems with Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . 988
15.3 Examples of Recursive Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
15.4 A Recursive Binary Search Method . . . . . . . . . . . . . . . . . . . . . . . . . . 999
15.5 The Towers of Hanoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1002
15.6 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007
Review Questions and Exercises 1007
Programming Challenges 1010

Chapter 16 Databases 1013

16.1 Introduction to Database Management Systems . . . . . . . . . . . . . . 1013
16.2 Tables, Rows, and Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1019
16.3 Introduction to the SQL SELECT Statement . . . . . . . . . . . . . . . . . . 1022
16.4 Inserting Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044
16.5 Updating and Deleting Existing Rows. . . . . . . . . . . . . . . . . . . . . . . 1048
16.6 Creating and Deleting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057
16.7 Creating a New Database with JDBC . . . . . . . . . . . . . . . . . . . . . . . 1060
16.8 Scrollable Result Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1062
16.9 Result Set Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063
16.10 Displaying Query Results in a JTable . . . . . . . . . . . . . . . . . . . . . . . . . .1067
16.11 Relational Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077
16.12 Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1099
16.13 Common Errors to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1101
Review Questions and Exercises 1101
Programming Challenges 1106
Java TM Quick Reference 1109
Index
 
Student CD-ROM:
Appendix A Getting Started with Alice
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 More about JOptionPane Dialog Boxes
Appendix K Answers to Checkpoints
Appendix L Answers to Odd-Numbered Review Questions
Case Study 1 Calculating Sales Commission
Case Study 2 The Amortization Class
Case Study 3 The PinTester Class
Case Study 4 Parallel Arrays
Case Study 5 The FeetInches Class
Case Study 6 The SerialNumber Class
Case Study 7 A Simple Text Editor Application

New to this edition
  • New Java 7 Topics Added: This edition discusses some of the new language features added in Java 7. Specifically, the ability to switch on a string expression is discussed in Chapter 3, type inference with the diamond operator is discussed in Chapter 7, and multicatch exception handling is discussed in Chapter 11.
  • New Organization: In previous editions, GUI programming with Swing was introduced in Chapter 7, and then revisited in Chapter 13. Many of the reviewers requested that GUI programming be postponed until inheritance had been covered. In this edition, the First Look at GUI Applications chapter has been moved to Chapter 12. However, the chapter has been written in a manner that it can still be covered immediately after Chapter 6 , as in the previous editions. Instructors who prefer to follow the previous sequence of topics can still do so. (See the chapter dependency chart in Figure P-1 for possible sequencing of the chapters.)
  • A New Chapter on Databases: New to this edition is Chapter 16, Databases. This chapter introduces the student to databases and SQL using JavaDB.
  • Expanded Coverage of the switch Statement: In Chapter 3, the introduction to the switch statement has been rewritten, and enhanced with a flowchart. A section covering the ability to switch on a string in Java 7 has also been added.
  • Coverage of System.out.printf Has Been Expanded: The section on System.out.printf in Chapter 3 has been completely rewritten, and expanded to include diagrams and coverage of additional format specifiers.
  • System.out.printf Is Primarily Used for Formatting Console Output: In this edition, System.out.printf is used as the primary method for formatting output in console programs. The DecimalFormat class is still introduced, but it is used to format numbers in GUI applications.
  • Discussion of Nested Loops Has Been Expanded: In Chapter 4 the section on nested loops has been expanded to include an In the Spotlight section highlighting the use of nested loops to print patterns.
  • Usage of Random Numbers Has Been Expanded: In Chapter 4 the section on random numbers has been expanded, and now includes In the Spotlight sections demonstrating how random numbers can be used to simulate the rolling of dice, and to determine the results of a coin toss.
  • A New Introduction to Objects Has Been Added to Chapter 6: In Chapter 6, a new introduction to objects has been added to the beginning of the chapter. The new introduction is much more practical and concrete than the previous introduction, discussing Java objects that the student has already used. The goal of this new introduction is to show, in a familiar way, how programs consist of objects. This reinforces an object-oriented mindset, and prepares the student to write his or her own classes.
  • New Motivational Examples of Classes Have Been Added to Chapter 6: In Chapter 6, new, motivational examples of classes have been added. One of the new examples introduces a Die class that simulates a die that can be rolled in a game. Another example shows how a variation of the game of Cho-Han can be simulated with classes that represent the players, a dealer, and the dice.
  • Equipping GUI Applications with a Static main Method Is Introduced Earlier: In the First Look at GUI Applications chapter, which is now Chapter 12, the topic of equipping a GUI class with a static main method has been moved to a point very early in the chapter.
  • New Exercises and Programming Problems: New shorter algorithm workbench exercises, and new motivational programming problems have been added to many of the chapters.
  • MyProgrammingLab, Pearson's new online homework and assessment tool, is available with this edition. Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming.
    • A self-study and homework tool, a MyProgrammingLab course consists of hundreds of small practice problems organized around the structure of this textbook. For students, the system automatically detects errors in the logic and syntax of their code submissions and offers targeted hints that enable them to figure out what went wrong–and why. For instructors, a comprehensive gradebook tracks correct and incorrect answers and stores the code inputted by students for review.
    • Access to step-by-step VideoNote tutorials and an interactive eText is included with the purchase of MyProgrammingLab. Subscriptions to MyProgrammingLab are available to purchase online or packaged with your textbook (unique ISBN). Contact your Pearson representative, or visit www.myprogramminglab for further information.

     

     

    Features & benefits
    • Procedural programming – control structures and methods –is covered before objects ensuring that students understand fundamental programming and problem-solving concepts.
    • The Fifth Edition is fully compatible with both Java 6.0 and the new version, Java 7.0.
    • A clear and student-friendly writing style with stepped-out explanations motivates beginning programmers.
    • Concise and practical real-world examples that students understand and relate to are included to foster motivation and retention.
    • A variety of exercises in each chapter encourages students to put concepts to work as they are learned.
    • In the Spotlight features in the first eight foundational chapters walk students through the design of a problem by showing all steps.
    • VideoNotes are step-by-step video tutorials specifically designed to enhance the programming concepts presented in Gaddis, Starting Out with Java: From Control Structures Through Objects,5e. Students can view the entire problem-solving process outside of the classroom—when they need help the most. VideoNotes are available with the purchase of a new copy of select titles. Go to www.pearsonhighered.com/videonotes for a brief VideoNotes demo.
    • Tony Gaddis’s best-selling Starting Out with series of textbooks provides accessible, detailed presentations of programming concepts using an approach that will increase confidence and competence in novice programmers. The Starting Out with series includes books on Alice, Python, Visual Basic, C++, Java, and Programming Logic & Design. View other titles in the series at the Gaddis Books website.
    • MyProgrammingLab, Pearson's new online homework and assessment tool, is available with this edition. Through the power of practice and immediate personalized feedback, MyProgrammingLab helps students fully grasp the logic, semantics, and syntax of programming.
      • A self-study and homework tool, a MyProgrammingLab course consists of hundreds of small practice problems organized around the structure of this textbook. For students, the system automatically detects errors in the logic and syntax of their code submissions and offers targeted hints that enable them to figure out what went wrong—and why. For instructors, a comprehensive gradebook tracks correct and incorrect answers and stores the code inputted by students for review.
      • Access to step-by-step VideoNote tutorials and an interactive eText is included with the purchase of MyProgrammingLab. Subscriptions to MyProgrammingLab are available to purchase online or packaged with your textbook (unique ISBN). Contact your Pearson representative, or visit www.myprogramminglab for further information.
    Author biography
    Tony Gaddis is the principal author of the Starting Out with series of textbooks. He has nearly two decades of experience teaching computer science courses, primarily at Haywood Community College. Tony 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 textbooks covering Programming Logic and Design, Alice, C++, Java, Microsoft Visual Basic, and Python.
    Supplement URL
    Student supplements
    Educator supp's
    Online resources