go to home page   go to next page

creation: 4/18/99; revised: 10/01/99, 01/22/00, 07/16/02, 01/28/06, 08/05/14

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, gears, handle bars, and other parts. Some of those parts are, in turn, made up of yet 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 composed of smaller software objects. This chapter shows how to do this in Java.

Chapter Topics:


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