Interface ISimulation Controller

The behavior of the interface ISimulationController is defined based on the role class SimulationController must play in the system. This is a control class as defined in Section 5.2, Control Classes, in this chapter. In this section, we mentioned that the role of control classes is to coordinate the interaction of different objects used in a use case realization. Therefore, objects created from the SimulationController class should have access to other objects used in the use case Start Simulation, to send them the right message at the right time. Objects used in this use case are of type Plant, Soil, and Weather, (i.e., objects created from classes Plant, Soil and Weather).

Furthermore, as class SimulationController controls the dialog with the user interface (or the boundary class), we will model it to follow the Fa├žade Pattern as defined in Section 4.4 of Chapter 7. According to this pattern, an object of type SimulationController will be the unique point of communication between the user interface or the boundary object and all other objects involved in the Start Simulation use case. The interface ISimulator should define the operations needed to communicate with the user interface or the boundary object. Figure 8-38 shows the Java implementation of the interface ISimulator.

1 import java.util.Properties;

0 0

Post a comment