creation 4/18/99; revisions 10/01/99, 01/22/00, 07/16/02

CHAPTER 35 — Objects that Contain Objects

One of the ideas of object oriented programming is to have software objects imitate "real world" objects. Most real world objects are made up of smaller objects. For instance, a bicycle is an object, and it is an assembly of several objects—frame, wheels, grears, handle bars, and other parts. Some of those parts are, in turn, made up of smaller parts. A wheel is made of a rim, a tire, an inner tube, a hub, and many spokes.

As with real world objects, software objects are often made with smaller software objects. The syntax of Java makes this easy to do. This chapter shows how to do it.

Chapter Topics:

QUESTION 1:

Could we continue to break down a bicycle into smaller and smaller objects?