Info

Figure 8-36. The format of the weather data file. 10.3.2 Class WeatherDataFromStation

Figure 8-36. The format of the weather data file. 10.3.2 Class WeatherDataFromStation

This class implements the behavior defined in IWeather interface in the case that the weather data are obtained from an on-line weather station. In this case, additional information needs to be provided such as the name or the identification number of the weather station and the starting and the ending date for the time interval of the simulation. These input data are combined in an SQL statement to extract the corresponding records from the database. Figure 8-37 shows the Java implementation of class WeatherDataFromStation.

1 importjava.net.*;

2 import java.util.*;

0 0

Post a comment