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.

Summary

The approach taken by this text can be described as "early objects, late graphics." The student is introduced to object-oriented programming early in the book.The fundamentals of control structures, classes, and the OOP paradigm are thoroughly covered before moving on to graphics and more powerful applications of the Java language. Although it is written for readers with no prior programming background, even experienced programmers will benefit from its depth of detail.

Table of Contents

Preface

v

Acknowledgments

xii

Classroom Feedback

xiii

About the Author

xvi

Introduction to Computers and Java

1

(34)

Introduction

2

(1)

Why Program?

2

(1)

Computer Systems: Hardware and Software

3

(5)

Programming Languages

8

(3)

What Is a Program Made Of?

11

(9)

Writing Your First Programs---How to Get Started

20

(3)

Object-Oriented Programming

23

(12)

Review Questions and Exercises

29

(4)

Programming Challenges

33

(2)

Java Fundamentals

35

(86)

The Parts of a Java Program

36

(6)

The print and println Methods, and the Java API

42

(7)

Variables and Literals

49

(7)

Primitive Data Types

56

(13)

Arithmetic Operators

69

(6)

Conversion Between Primitive Data Types

75

(6)

Combined Assignment Operators

81

(2)

Creating Named Constants with final

83

(1)

The String Class

84

(6)

Scope

90

(1)

Comments

91

(3)

Programming Style

94

(2)

Using the Scanner Class to Read Keyboard Input

96

(9)

Dialog Boxes

105

(7)

Common Errors to Avoid

112

(9)

Review Questions and Exercises

114

(4)

Programming Challenges

118

(3)

A First Look at Classes and Objects

121

(62)

Classes

122

(21)

More about Passing Arguments

143

(2)

Instance Fields and Methods

145

(4)

Constructors

149

(7)

A BankAccount Class

156

(6)

Classes, Variables, and Scope

162

(2)

Packages and import Statements

164

(2)

Focus on Object-Oriented Design: Finding the Classes and Their Responsibilities