About the Book
Introduction to Programming Using
Java offers an object-oriented approach, introducing the concepts of object,
class, and message as early as the first chapter. This approach is used
throughout the text as students learn the fundamentals of object-oriented
programming along with the basics of imperative programming. The authors
place a strong emphasis on the software development process, presenting
a clear and usable procedure for solving problems by developing classes.
Features
-
Focuses on programming as modeling by discussing
how to extract the major points of problems and represent them in a program.
-
Contains extensive examples that explain the
design decisions of Java.
-
Provides an early introduction to testing,
including test drivers, debuggers, and test case selection.
Related
Books
Introduction to Computer Programming Courses
(Intro
to Computer Programming)
Table of Contents
1. Jumping Into Java.
Computers and Programs.
Programs and Models.
Objects, Classes, and Messages.
Our First Object: A PrintStream.
Sending a Message to the System.out
Object.
A Java Program.
IDENTIFIERS, STATEMENT ORDER, FORMAT,
AND COMMENTS.
Mechanics.
Time.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
INTRODUCTION: WEB PAGES, HTML, AND
APPLETS.
2. Sending Messages and Performing
Operations.
Introduction.
Using PrintStream Objects.
REFERENCES, METHODS, AND MESSAGES.
The String Class.
Methods, Arguments, and Return Values.
Reference Variables.
VARIABLES AND ASSIGNMENT.
Using String Methods.
Imperative Programming: Doing the
Work.
Examples.
JAVA INTERLUDE: String OBJECTS AND
THE + OPERATOR.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
PAINTING AND POSITIONING GRAPHICS.
3. Working with Objects and Primitive
Types.
Introduction.
Creating Objects.
ORIGINS OF OBJECTS.
Working With Objects.
Dates and Calendars.
BigInteger.
Introduction to Input.
The File Input Process.
Keyboard Input.
File Output.
Network Computing: An Introduction.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
TOWARDS ANIMATION.
4. Defining Classes.
Introduction.
Class Definition: Methods.
Class Definition: Instance Variables.
More on Methods: Return Values.
Imperative Programming: Finding the
Minimum.
VARIABLES, DECLARATIONS, AND THE return
STATEMENT.
Still More on Methods: Parameters.
State and Behavior.
Class Definition: Putting it All Together.
DECLARATIONS, ACCESS, AND OBJECTS.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
A SIMPLE ANIMATION.
5. Advanced Class Definition.
Customizing New Objects: Constructors.
CONSTRUCTORS, INITIALIZERS, AND OVERLOADING.
Example: A Name Class.
Providing Class Behaviors.
STATIC METHODS.
Tracking Class-wide Information: Static
Variables.
Defining Constant Values: final.
WORKING WITH OBJECTS.
Input Methods Revisited: Testing for
End of Input.
SUMMARY.
TERMINOLOGY REVIEW.
Questions for Review.
Further Exercises.
CREATING CONTROLS AND INTERACTION.
6. Inside the Method: Imperative
Programming.
Introduction.
A Metric Conversion Class.
float, double, AND THE for STATEMENT.
Approximating the Value of p.
Cascaded and Compound Conditional
Statements.
LOGICAL OPERATORS AND CONDITIONAL
STATEMENTS.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
MORE ON INTERACTION.
7. Designing Classes.
Introduction.
Designing Classes-An Overview.
The Counter Class Revisited.
An Automated Teller Machine.
Dispatching Repairpeople: An Example.
Summary.
Questions for Review.
Further Exercises.
MULTIPLE CONTROLS: LAYOUT AND EVENT
HANDLING.
8. Verifying Object Behavior.
Introduction.
Categories of Errors.
JAVA'S ASSERTION FACILITY.
Test Drivers.
Automatic Testing.
What to Test and How to Test It.
Debugging Techniques.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
SEPARATING DISPLAY AND CONTROL.
9. Working with Multiple Objects.
Introduction.
Processing Multiple Objects.
Loop Patterns.
The Impact of Loops on Testing.
A Telephone Book.
Maintaining Multiple Values.
Vector-A Simple Collection Class.
Traversing Vectors Using for Loops.
Revisiting the TelephoneBook Class.
PRIMITIVE TYPES AND COLLECTIONS; REVISITING
THE WRAPPER.
CLASSES.
An Example-Determining a Student's
Relative Performance.
Another Vector Application.
Object METHODS.
Introducing Arrays.
Vectors and Arrays.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
POSITIONING TEXT.
10. Designing Iteration.
Introduction.
Designing Loops.
JAVA INTERLUDE: TWO LOOP STATEMENTS.
Another Simple Example.
Revisiting the Loop Patterns of Chapter.
Variations on the Repairperson Loop.
More Loop Patterns: Counters, Accumulators,
and Extremes.
SHORT CIRCUITS, break AND continue.
A Loop Design Strategy: Refining an
Imperfect Solution.
The Radio Station's Play Schedule.
Example: The LOGO Turtle.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
MORE TEXT MANIPULATION.
11. Maintaining Collections of Objects.
Overview.
Searching.
Binary Search.
Finding the Index of an Extreme.
Sorting.
Summary.
Study Aid: Terminology Review.
Questions for ReviEW.
Further Exercises.
THREADS.
12. Extending Class Behavior.
Introduction.
Extending Classes-Inheritance I.
A Better BufferedReader.
Adding State to the Subclass-Accessing
the Superclass's State.
Revisiting the Name Class-Adding Additional
State.
INHERITANCE.
Overriding Methods.
POLYMORPHISM.
Factoring out Common Behavior-Inheritance
II.
Abstract Methods and Classes.
Specifying Common Behavior-Interfaces.
A Generic Sorting Method.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
EXPLORING THE AWT PORTION OF THE JAVA
CLASS HIERARCHY.
13. Exceptions.
Expect the Unexpected.
Encountering the Unexpected.
THE Exception CLASS.
Handling the Unexpected.
Responsibility for the Unexpected.
Exceptions Are Not Always Errors.
Summary.
Study Aid: Terminology Review.
Questions for Review.
Further Exercises.
THE MODEL-VIEW-CONTROLLER (MVC) PARADIGM.
14. Recursion.
Introduction.
Example: Exponentiation.
How to Design a Recursive Method.
Recursive Methods: Under the Hood.
Recursion with Vectors, Arrays,and
Strings.
Permutations.
Towers of Hanoi.
Recursion and Iteration.
Summary.
Questions for Review.
Study Aid: Terminology Review.
Further Exercises.
TOWERS OF HANOI APPLET.
15. Client/Server Computing.
Clients and Servers.
Internet Communication.
Client-Server Computing.
Some Simple Client Classes.
SWING. |