Java Reference
In-Depth Information
Figure 5.8. When completed, this diagram will show an object model of the Oozinoz
process for making aerial shells.
CHALLENGE 5.6
Figure 5.8 shows the objects in a model of the shell assembly process. A complete
object diagram would show links between any objects that refer to each other. For
example, the diagram shows the references that the make object retains. Your
challenge is to fill in the missing links in the diagram.
The getStepCount() operation in the ProcessComponent hierarchy counts the number
of steps in a process flow. This method has to be careful to count each step only once and to
not enter an infinite loop when a process contains a cycle. The ProcessComponent class
implements the getStepCount() method so that it relies on a companion method that
passes along a set of visited nodes:
Search WWH ::




Custom Search