Design Patterns Java™ Workbook

(Michael S) #1
Chapter 18. Prototype

machine. On this project, your job is to create the machine simulation objects, which you have
completed as Figure 18.3 shows.


Figure 18.3. Machine simulations have at least a location and mean-time- between-failure
for the machine.

Every machine simulation object has a mean-time-between-failure (MTBF), a field that
shows the average number of hours between the time a machine goes down and the time it
comes up again. Each simulation also has a Location field. Note that in the simulation, bays
are identified by number and are not treated as machine composites. The location of
a machine is measured as the machine's distance, in any units, from the northwest corner of
the bay that the machine is in. Figure 18.4 shows this coordinate system.

Free download pdf