Refactoring to Chain of Responsibility

The Oozinoz application suite includes a visualization that shows machines on the factory floor. The visualization includes the ability to select multiple items and to pop up a menu of various requests. One item on the pop-up menu displays a list of the engineers who are responsible for the selected equipment. The simulated items include machines, machine composites, tools, and tool carts. Tools are always assigned to tool carts, and tool carts have a responsible engineer. In determining who is responsible for the machine, machines may have a responsible engineer or may defer to the line they are part of or to the factory itself. Figure 12.1 shows the classes involved in finding the engineers who are responsible ...

Get Design Patterns Java™ Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.