63 props = new Properties();
64 props.put("totalPlantDry Weight", new Double( plant.getTotalPlantDryWeight()));
65 props.put("rootDry Weight", new Double(plant.getRootDryWeight()));
66 props.put("fruitDryWeight", new Double(plant.getFruitDryWeight()));
67 props.put("maturityDay",new Integer (plant.getMaturityDay()));
Figure 8-39. Implementation of class SimulationController in Java (Part 3 of 3).
Lines 57 through 59 define the method getPropertyFileQ that returns the property file where the results of the simulation are saved. Lines 61 through 69 show the implementation of the method saveFinalResultsQ. Plant data such as total plant dry weight, root dry weight, fruit dry weight, and the day of the year the maturity status is reached are saved in the props file. Therefore, these final plant results can be used by the boundary object to display them to the user.
Was this article helpful?