May 2002
Intermediate to advanced
416 pages
8h 37m
English
Each instance of a class generally has a lifetime. Objects are created, they progress through certain stages, and then go away. Their behavior is a progression through various stages over time. These changes over time are known as the lifecycle of the object.
As an example of a lifecycle, let's consider a light bulb. When power is applied, the bulb (if properly installed) goes on. When power is removed, the bulb goes off. Eventually the filament breaks and applying power has no effect.
Figure 9.1 shows a representation of the light bulb's behavior.

This simple pattern of dynamic behavior ...
Read now
Unlock full access