May 2002
Intermediate to advanced
416 pages
8h 37m
English
Recall the definition of a class.
A class is an abstraction of a set of real-world things such that
All the real-world things in the set—the instances—have the same characteristics (“common characteristics”).
All instances are subject to and conform to the same rules and policies (“common behavior”).
Since all instances of the class must follow the same rules of behavior, when we abstract a group of like things to produce a class, we also abstract their common behavior pattern into a lifecycle typical of the class. The lifecycle provides a formal description of the behavior pattern shared by each of the objects, called a state machine, as illustrated in Figure 9.12.
Read now
Unlock full access