Info

6 private static SimulationController uniquelnstance=null;

7 private IPlant plant;

8 private ISoil soil;

9 private IWeatherDataProvider weather;

10 private Properties props;

11 private SimulationController() {

12 ResourceBundle classBundle =

ResourceBundle.getBundle("ClassNames");

13 weather = (IWeather)ObjectFactory.newInstance (

classBundle-getStringCweather"));

14 plant = (IPlant)ObjectFactory.newInstance(

classBundle.getStringC'plant"));

15 soil = (ISoil)ObjectFactory.newInstance(

classBundle.getStringC'soil"));

16 //Establish relation Soil-Plant

17 plant.setSoil(soil);

18 soil.setPlant(plant);

19 //Estalish relation Plant-Weather

20 plant, set Weather(/weather);

21 //Establish relation Soil-Weather

22 soil. setWeather(weather) ;

Was this article helpful?

0 0

Post a comment