Java Reference
In-Depth Information
Part I
Basic Object-Oriented Programming
Part I introduces the basics of programming in an object-oriented language.
Chapter 0 provides an introduction to computers and programming.
Chapter 1 introduces expressions and how Java evaluates them. The reader
already knows a lot about expressions and has to see only how one writes expres-
sions in Java and and how they are evaluated by Java. Practice with expressions
is the key to a quick understanding and obtaining fluency with Java expressions.
Thereafter, the notions of a variable, the declaration of a variable, and an
assignment to a variable are explained. Again, practice with the concepts is key
to a quick understanding
Chapter 1 also explains object-oriented concepts —what an object is and
how a class definition is a template for a collection of objects with the same for-
mat. The first class definition one sees extends, or customizes, a class to fit one's
needs. Our experience is that this is the easiest way to get across the concepts.
Finally, Chap. 1 introduces the notion of a method as a recipe for getting
something done (a procedure) or calculating a value (a function).
Chapter 2 is a thorough, in-depth discussion of methods. It includes a dis-
cussion of the if-statement and a short introduction to the for-loop. Also included
is a discussion of stepwise refinement , an idealized notion of how one goes about
developing a method.
Chapter 3 then covers classes thoroughly, repeating some of the material of
section 1 and going into more detail, while Chap. 4 covers subclasses.
Chapter 5 looks at some of the classes in the Java API (Application
Programmer Interface) —like the wrapper classes, classes String and Vector ,
classes for formatting numbers and for generating random numbers, and classes
for doing input/output (I/O). These are written so that the instructor can introduce
them at almost any point, once Chap. 1 has been covered.
Chapter 6 provides a reference for the primitive types of Java.
Search WWH ::

Custom Search