Programming and Problem Solving with Java

(やまだぃちぅ) #1

6


CHAPTER


we introduced some general techniques for solving simple
problems. In the real world, many programming problems are collections
of multiple problems that must be solved in a coordinated manner. We
now know enough Java syntax to solve many such problems, but we need
to learn how to organize our problem solving to achieve success in the face
of greater complexity.
In this chapter, we reexamine the programming process and intro-
duce a software design strategy that helps us tame the seemingly vast ar-
ray of details that accompany a larger problem. In particular, we formalize
the concepts of object-oriented design and present the CRC card design
technique.
We revisit the class construct, the implementation structure that we
use to code our object-oriented design. Once we have a design in the
form of CRC cards, we see how to convert it into a class. As part of this
process, we look at the user interface, the implementation of the re-
sponsibility algorithms, and the testing of the class. Then we explore
how to use Java packages to organize groups of classes.
Finally, we take the opportunity to emphasize that professional re-
sponsibility comes with the skills that this book teaches.


In Chapter 1,

1959
Xerox debuts the
first commercial
copy machine

1959
General Electric
develops the GE
ERMA, the first
machine that can
process checks
encoded with
magnetic ink

1960
Digital Equipment
Corporation debuts
the PDP-1, which
has a monitor and
keyboard input

1961
The first robot
patent is obtained
by Georg Devol
whose “Unimates”
are the first modern
industrial robots

1961
Computer
capabilities launch
forward with the
IBM 7030, which
runs 30 times faster
than the 704

1962
The first computer
science departments
are established at
Stanford University
and Purdue
University
Free download pdf