Reviews : Java Books :
Beginning Java Objects : Chapters 2 and 3

Title: Beginning Java Objects
ISBN: 1861004176
US Price: $ 39.99
Canadian Price:
C$ 59.95
UK Price: £ 28.99
Publication Date: November 2000
Pages: 800
© Wrox Press Limited, US and UK.

Beginning Java Objects: Chapter 2
Abstraction and Modeling

Generalization Through Abstraction

If we eliminate enough detail from an abstraction, it becomes generic enough to apply to a wide range of specific situations or instances. Such generic abstractions can often be quite useful. For example, a diagram of a generic cell in the human body might include only a few features of the structures that are found in an actual cell:

image 1 This overly simplified diagram doesn't look like a real nerve cell, or a real muscle cell, or a real blood cell; and yet, it can still be used in an educational setting to describe certain aspects of the structure and function of all of these cell types — namely, those features that the various cell types have in common.

The simpler an abstraction — that is, the fewer features it presents — the more general it is, and the more versatile it is in describing a variety of real-world situations. The more complex an abstraction, the more restrictive it is, and thus the fewer situations it is useful in describing.

Organizing Abstractions Into Classification Hierarchies

Even though our brains are adept at abstracting concepts such as road maps and landscapes, that still leaves us with hundreds of thousands, if not millions, of separate abstractions to deal with over our lifetimes. To cope with this aspect of complexity, human beings systematically arrange information into categories according to established criteria; this process is known as classification.

For example, science categorizes all natural objects as belonging to either the animal, plant, or mineral kingdom. In order for a natural object to be classified as an animal, it must satisfy the following rules:

  • It must be a living being.
  • It must be capable of spontaneous movement.
  • It must be capable of rapid motor response to stimulation.

The rules for what constitute a plant, on the other hand, are different:

  • It must be a living being (same as for an animal).
  • It must lack an obvious nervous system.
  • It must possess cellulose cell walls.

image 2 Given clear-cut rules such as these, placing an object into the appropriate category, or class, is rather straightforward. We can then 'drill down', specifying additional rules which differentiate various types of animal, for example, until we've built up a hierarchy of increasingly more complex abstractions from top to bottom. A simple example of an abstraction hierarchy is shown at the right.

When thinking about an abstraction hierarchy such as the one shown above, we mentally step up and down the hierarchy, automatically zeroing in on only the single layer or subset of the hierarchy (known as a subtree) that is important to us at a given point in time. For example, we may only be concerned with mammals, and so can focus on the mammalian subtree:

image 3
temporarily ignoring the rest of the hierarchy. By doing so, we automatically reduce the number of concepts that we mentally need to 'juggle' at any one time to a manageable subset of the overall abstraction hierarchy; in the simplistic example above, we are now dealing with only four concepts rather than the original 13. No matter how complex an abstraction hierarchy grows to be, it needn't overwhelm us if it is properly organized.




How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.