Scott/Jones · Scott/Jones · Scott/Jones · Scott/Jones · Scott/Jones · Scott/Jones · Scott/Jones · Scott/Jones

Home | Textbook Catalog | Order Book | Syllabi

 

Save 12% over most
bookstore prices by ordering
directly from Scott/Jones!

Take an in depth look at all of our Gaddis books at www.gaddisbooks.com

Available Now!
Starting Out with Java
by Tony Gaddis

ISBN 1-57676-109-6

and

Available Now!
Starting Out with Java,
Alternate Edition

by Tony Gaddis

ISBN 1-57676-137-1

 

Starting Out with Java
ISBN 1-57676-109-6

 
 
Starting Out with Java, Alternate Edition
ISBN 1-57676-1
37-1

Which Gaddis Is Right for You? Compare!

Starting Out with Java,
Standard Version

ISBN 1-57676-109-6
Starting Out with Java,
Alternate Version

ISBN 1-57676-137-1

—Uses an author-written Keyboard class to read console input.
—JOptionPane introduced as an optional section.

 —Uses real Java I/O from the beginning. It shows the student how to gather input and display messages using JOptionPane dialog boxes. In addition, the student learns how to use System.in to gather console keyboard input
—Uses C and C++ style comments, and provides an appendix on javadoc. —Uses javadoc comments in every program
—Classes introduced before control structures —Control structures introduced before classes
—GUI development introduced in
Chapter 12
—GUI development introduced in
Chapter 7

No matter which Gaddis is right for you, either will be right for your students. For example . . .

 “I love this book—Dietel & Dietel just about killed my students.”
—Frank Lucent, Westmorland County Community College

 “For 2 years previous to this one, I was a full-time instructor at St.
Petersburg College in St. Pete and used your books. I love them !
I am now an adjunct for online classes at SPC and plan to switch to your
books for those classes ASAP.”
—Amy Patterson, Computer Science Teacher, Shorecrest Prep. School

Tables of Contents

Starting Out with Java
ISBN 1-57676-109-6

Chapter 1: Introduction to Computers and Java
1.1 Introduction
1.2 Why Program?
1.3 Computer Systems: Hardware and Software
         Hardware
               The CPU
               Main Memory
               Secondary Storage
               Input Devices
               Output Devices

         Software

1.4 Programming Languages
         What Is a Program?
         Languages
         A History of Java
         Applications and Applets
               Security
1.5 What Is a Program Made Of?
         Language elements
               Key Words
               Programmer-Defined Names
               Operators
               Punctuation

        Lines and statements
        Variables
        The Compiler and the Java Virtual Machine
               Portability
         Versions of Java
               SDK, JDK, and the Different Editions
         Compiling and Running a Java Program
               Using the Java 2 SDK
               Using an IDE

1.6 Object-Oriented Programming
         Procedural vs. Object-Oriented Programming
         Objects
               Attributes
               Methods

         Component reusability
         An Everyday Example of an Object
         OOP Terms
               Classes and Objects
               Inheritance

1.7 The Programming Process
Review Questions, and Exercises

Chapter 2: Java Fundamentals
2.1 The Parts of a Java Program
2.2 The print and println Methods, and the Java Standard Class Library
2.3 Variables and Literals
2.4 Primitive Data Types
2.7 Arithmetic Operators and Math.pow
2.6 Creating Named Constants with final
2.7 The String Class
2.8 Scope
2.9 Comments
2.10 Programming Style
2.11 A Class for Keyboard Input
2.12 Using the JOptionPane Class (Optional)
2.13 Common Errors to Avoid
Review Questions, and Exercises

Chapter 3: A First Look at Classes and Objects
3.1 Classes
         Classes and Instances
         Building a Simple Class Step by  Step
               UML diagrams
               Fields
               Methods, Accessors and Mutators
               Passing Arguments to Methods
               Returning Values from Methods
               Avoiding Stale Data
               Showing Access Specification in the UML
               Data Type and Parameter Notation in the UML

3.2 More About Passing Arguments
         Passing Multiple Arguments
         Pass by Value

3.3 Instance Fields and Methods
3.4 Constructors
         The Default Constructor
         Showing Constructors in the UML
         The
String Class Constructor
3.5 A BankAccount Class
3.6 Combined Assignment Operators
3.7 Classes, Variables, and Scope
         The Scope of Fields, Local Variables, and Parameter Variables
         Shadowing Fields with Local Variables

3.8 Conversion Between Primitive Data Types
         Widening and Narrowing Conversions
         Cast Operators
         Mixed Integer Expressions
         Other Mixed Mathematical Expressions

3.9 Common Errors to Avoid
Review Questions, and Exercises

Chapter 4: Decision Structures
4.1 The if Statement
         Using Relational Operators and Boolean Expressions
         Programming Style and the
if Statement
         Having Multiple Conditionally-Executed Statements
         Flags
        Comparing Characters

4.2 The if-else Statement
4.3 The Payroll Class
4.4 The if-else-if Statement
         The if-else-if Structure
         The Trailing
else
         Comparing the
if-else-if Structure to a Series of if Statements
4.5 Nested if Statements
4.6 Logical Operators
         The &&, ||, and ! operators
         Short-Circuit Evaluation
         Precedence and Associativity
         Checking Numeric Ranges with Logical Operators

4.7 Comparing String Objects
         The equals Method
         The
compareTo Method
4.8 More About Variable Declaration and Scope
4.9 The Conditional Operator
4.10 The switch Statement
4.11 The DecimalFormat Class
4.12 The SalesCommission Class
4.13 Common Errors to Avoid
Review Questions and Exercises

Chapter 5: Loops and Files
5.1 The Increment and Decrement Operators
         The Difference Between Postfix and Prefix Modes
5.2 The while Loop
         The while Loop Is a Pretest Loop
         Infinite Loops
         Don't Forget the Braces with a Block of Statements
         Programming Style and the
while Loop
5.3 Using the while Loop for Input Validation
5.4 The do-while loop
         The do-while Loop Is a Posttest Loop
5.5 The for Loop
         The for Loop's Expressions
         The
for Loop Is a Pretest Loop
         Avoid Modifying the Control Variable in the Body of the Loop
         Other Forms of the Update Expressions
         Declaring a Variable in the Initialization Expression
         Creating a User Controlled
for Loop
         Using Multiple Statements in the Initialization and Update Expressions

5.6 Running Totals and Sentinel Values
5.7 Nested Loops
5.8 The break and continue Statements
5.9 Deciding Which Loop to Use
5.10 Introduction to File Input and Output
         Opening Files
         Reading Data from a File
         Using a loop to Read Data from a File

5.11 Focus on Problem Solving: The Amortization Class
5.12 Common Errors to Avoid
Review Questions and Exercises

Chapter 6: A Second Look at Classes and Objects
6.1 Static Class Members
6.2 Overloaded Methods
6.3 Overloaded Constructors
6.4 Passing Objects as Arguments to Methods
6.5 Returning Objects from Methods
6.6 The FeetInches Class: Examining the toString method, the equals Method, and Methods that Perform Same Class Operations
6.7 Aggregation
         The "has a" Relationship
         Aggregation in UML Diagrams
         Avoid Returning References to Private Fields
         Avoid Using
null References
6.8 The this Reference Variable
         Using this to Overcome Shadowing
6.9 Packages
         Making a Package
         Setting
CLASSPATH Under Windows
         Setting
CLASSPATH Under UNIX or Linux
         Using the
import Statement
         Using Fully-Qualified Class Names
         Using Package Subdirectories
         Access Specifiers and Packages

6.10 Inner Classes
6.11 Garbage Collection
         The finalize Method
6.12 More About the Math Class
6.13 Common Errors to Avoid
Review Questions, and Exercises

Chapter 7: Arrays
7.1 Introduction to Arrays
         Declaring Arrays
         Accessing Array Elements
         Inputting and Outputting Array Contents
         Bounds Checking
         Watch for Off-By-One Errors
         Array Initialization
         Alternate Array Declaration Notation

7.2 Processing Array Contents
         Array Length
         Letting the User Specify the Array Size
         Reassigning Array Reference Variables
         Copying Arrays

7.3 Passing Arrays as Arguments
7.4 Some Useful Array Algorithms and Operations
         Comparing Arrays
         Summing the Values in an Array
         Getting the Average of the Values in an Array
         Finding the Highest and Lowest Values in an Array
         The
SalesData Class
         The
Arrays.Sort Method
         Partially Filled Arrays
         Working with Arrays and Files

7.5 Returning Arrays from Methods
7.6 String Arrays
         Calling String Methods from an Array Element
7.7 Arrays of Objects
7.8 The Sequential Search Algorithm
7.9 Parallel Arrays
7.10 The PinTester Class
7.11 The Selection Sort and Binary Search Algorithms
7.12 Command-Line Arguments
7.13 Two-Dimensional Arrays
         Rows and Columns
         Initializing a Two-Dimensional Array
         The Length Field in a Two-Dimensional Array
         Displaying All of the Elements in a Two-Dimensional Array
         Summing All of the Elements in a Two-Dimensional Array
         Summing the Rows in a Two-Dimensional Array
         Summing the Columns in a Two-Dimensional Array
         Passing Two-Dimensional Arrays to Methods

7.14 Arrays with Three or More Dimensions
7.15 The Random Class
7.16 Common Errors to Avoid
Review Questions and Exercises

Chapter 8: Text Processing and Wrapper Classes
8.1 Introduction to Wrapper Classes
8.2 Character Testing and Conversion with the Character Class
         Character Testing
         Case Conversion

8.3 More About String Objects
         Searching for Substrings
               The startsWith, endsWith, and regionMatches Methods
               The
indexOf and lastIndexOf Methods
         Extracting Substring
               The substring, getChars, and toCharArray Methods
         Methods that Return a Modified Substring
               The concat, replace, and trim Methods
               The
valueOf Methods
8.4 The StringBuffer Class
         Constructors
         Other Methods

8.5 The StringTokenizer Class
         Constructors
         Extracting Tokens
         Using Multiple Delimiters
         Trimming a String Before Tokenizing

8.6 Focus on Problem Solving: The SerialNumber Class
8.7 Wrapper Classes for the Numeric Data Types
         Instantiating
         The Parse Methods
         The
toString Methods
         The
toBinaryString, toHexString, and toOctalString methods
         The
MIN_VALUE and MAX_VALUE constants
8.8 Common Errors to Avoid
Review Questions, and Exercises

Chapter 9: Inheritance
9.1 What Is Inheritance?
         Generalization and Specialization
         The "is-a" Relationship
         Inheritance in UML Diagrams
         The Base Class Default Constructor
         Inheritance Does Not Work in Reverse

9.2 Calling the Base Class Constructor with super
         When the Base Class Has No Default Constructor
         Summary of Constructor Issues in Inheritance

9.3 Overriding Base Class Methods
         Overloading vs. Overriding
         Preventing a Method from Being Overriden

9.4 Protected Members
         Protected Access
         Package Access

9.5 Classes Derived from Derived Classes
         Creating a Chain of Inheritance
         How to Show It in UML
         Class Hierarchies

9.6 The Object Class
9.7 Polymorphism
         Dynamic Binding
9.8 Abstract Classes and Abstract Methods
9.9 Interfaces
         Interface Methods
         Implementing an Interface
         Implementing Multiple Interfaces
         Interface Fields
         Interfaces in UML

9.10 Common Errors to Avoid
Review Questions and Exercises

Chapter 10: Exceptions and Stream I/O
10.1 Handling Exceptions
         What an Exception Is
         The Exception Class Hierarchy
         Handling an Exception
         Retrieving the Default Error Message
         Polymorphic References to Exception Objects
         Handling Multiple Exceptions
               Using Exception Handlers to Recover from Errors
               Handle Each Exception only Once in a
try Statement
         The
finally Clause
         The Stack Trace
         When an Exception is Not Caught
         Checked and Unchecked Exceptions

10.2 Throwing Exceptions
         Throwing a Standard Exception
         Creating an Exception Class

10.3 More About Input/Output Streams
         Input and Output Streams, Byte and Character Streams
         More About Reading Data From a Text File
         More About Writing Data to a Text File

10.4 Overview of the Keyboard Class
10.5 Advanced File Operations
         Binary Files
         Random Access Files
         Object Serialization

10.6 Common Errors to Avoid
Review Questions and Exercises

Chapter 11: GUI Applications, Part 1
11.1 Introduction
         The JFC, AWT, and Swing
         Heavyweight vs. Lightweight components
         The javax.swing and java.awt Packages
         Event-Driven Programming

11.2 Dialog Boxes
         A review of JOptionPane
         More About Message Dialogs
         Modal Dialog Boxes
         More About Input Dialogs
         Displaying Confirm Dialogs

11.3 Creating Windows
         Containers
         The JFrame Class
         Setting the Window Size
         Setting the Default Close Operation
         Making the Window Visible
         Extending the JFrame Class
         Adding Components to a Window
               The JLabel Class
               The
JTextField Class
               The
JButton Class
         Content Panes
         The JPanel Class
         Handling Events with Action Listeners
         More About the Event Object
         The AWT and Swing Class Hierarchy
         Background and Foreground Colors

11.4 Layout Managers
         What Is a Layout Manager?
         Adding a Layout Manager to a Container
         The FlowLayout Manager
               Alignment
               Component Gaps

         The BorderLayout Manager
               Nesting Panels Inside the Regions
         The GridLayout Manager

11.5 Radio Buttons and Check Boxes
         Radio Buttons
               The JRadioButton Class
               Grouping Radio Buttons with the
ButtonGroup Class
               Radio Button Events
               Determining in Code Whether a Radio Button Is Selected
               Selecting a Radio Button in Code

         Check Boxes
               The JCheckBox Class
               Responding to Check Box Events
               Determining in Code Whether a Check Box Is Selected
               Selecting a Check Box in Code

         The AWT and Swing Class Hierarchy Revisited

11.6 Borders
         The setBorder Method
         Using the BorderFactory Class
         Empty Borders
         Line Borders
         Titled Borders

11.7 Focus on Problem Solving: Deriving Classes from JPanel
         Encapsulating Groups of Related Components in Custom Panel Objects
         The Order Calculator Application for Brandi's Bagel House

11.8 Common Errors to Avoid
Review Questions and Exercises

Chapter 12: GUI Applications, Part 2
12.1 Read-Only Text Fields
12.2 Lists
         The JList Class
         Selection Modes
         Responding to List Events
         Retrieving the Selected Item
         Placing a Border Around a List
               The BorderFactory Class
         Adding a Scroll Bar to a List
               The JScrollPane Class
         Adding Items to an Existing JList Component
         Multiple Selection Lists
               Single Interval Selection Mode
               Multiple Interval Selection Mode

12.3 Combo Boxes
         Responding to Combo Box Events
         Retrieving the Selected Item
         Editable vs. Uneditable Combo Boxes

12.4 Displaying Images in Labels and Buttons
         The ImageIcon Class
         Labels with Images
         Buttons with Images

12.5 Keyboard Mnemonics and Tool Tips
12.6 File Choosers and Color Choosers
12.7 Menus
         Menu Bars
         Menus
         Menu Items
         Radio Button Menu Items
         Check Box Menu Items
         Submenus
         Separator Bars

12.8 More About Text Components: Text Areas and Fonts
12.9 A Simple Text Editor Application
12.10 Sliders
12.11 Look and Feel
12.12 Common Errors to Avoid
Review Questions and Exercises

Chapter 13: Applets
13.1 How Applets Work over the Internet
13.1 AWT vs. Swing for Applets
13.2 The Applet Class
13.3 Viewing Applets
         Viewing with the Applet Viewer
         Viewing in a Web Browser

13.4 Some AWT Components
13.5 Handling Events in an Applet
13.6 Layout Managers in an Applet
13.7 Some Example Applets
13.8 Drawing Shapes
13.9 Using the Timer Class for Simple Animations
13.10 Common Errors to Avoid
Review Questions and Exercises

Chapter 14: Recursion
14.1 Introduction to Recursion
14.2 The Recursive Factorial Function
14.3 The Recursive gcd Function
14.4 Solving Recursively Defined Problems
14.5 Recursion Versus Iteration
14.6 Common Errors to Avoid
Review Questions and Exercises

Appendices
Appendix A: The ASCII and Unicode Characters
Appendix B: Operator Precedence Table
Appendix C: Java Key Words
Appendix D: Source Code for the Keyboard Class
Appendix E: Class References
Appendix F:  Using javadoc
Appendix G:  Answers to Checkpoints
Appendix H: Answers to Odd Numbered Review Questions

Supplements on Accompanying CDs
Sun Java 2 SDK
Borland JBuilder 8
jGRASP
Source Code for All Examples

Starting Out with Java, Alternate Edition
ISBN 1-57676-137-1

Chapter 1:       Introduction to Computers and Java
Chapter 2:       Java Fundamentals
Chapter 3:       Decision Structures
Chapter 4:       Loops and Files
Chapter 5:       Methods
Chapter 6:       A First Look at Classes
Chapter 7:       GUI Applications
Chapter 8:       Arrays
Chapter 9:       A Second Look at Classes
Chapter 10:     Text Processing and More About Wrapper Classes
Chapter 11:     Inheritance
Chapter 12:     Exceptions and Stream I/O
Chapter 13:     Advanced GUI Applications
Chapter 14:     Applets and More
Chapter 15:     Recursion

Appendices
Appendix A:      The ASCII and Unicode Characters
Appendix B:      Operator Precedence Table
Appendix C:      Java Key Words
Appendix D:      Using the javadoc Utility
Appendix E:      Using JBuilder 8
Appendix F:      Answers to Checkpoints
Appendix G:     Answers to Odd Numbered Review Questions

Supplements on Accompanying CDs
Sun Java 2 SDK
Borland JBuilder 8
jGRASP
Source Code For All Examples
Bonus Sections, Case Studies, and Appendices

Starting Out with Java
by Tony Gaddis
ISBN 1-57676-109-6

Starting Out with Java, Alternate Edition
by Tony Gaddis
ISBN 1-57676-137-1

Home | Textbook Catalog | Order Book | Syllabi


Scott/Jones Inc., El Granada CA
Website maintenance & updating by
Jane Scott/Jones
Updated February29, 2004.