, . , WeatherClock. .
1.5.1 WeatherData
, , RSS () , , , , , , .
:
WeatherClock, RSS-, , RSS-, XML- -, RSS_, RSS- XML- , RSS- XML-.
- WeatherClock, , , , , , , , , , .
WeatherClock, , , - , , , , , - ,
:
- RSS- , , , , , , , , .
|
|
1.5.2 Weather Clock
WeatherClock . 7, .8
. 7.
.8.
1.5.3
, . ( use-case ) :
;
;
.
RSSParser (RSS_), url- . RSSParser getXML(xml- ) :
sourse:String- , ;
location:Location ()
date:DateTime
getXML xml , . xml- ParseXML (xml-) . DayForecast ( ) WeatherReport( ).
DayForecast , :
date: DateTime , ;
humidity: Integer ;
pressure: Integer ;
skyCode: String {; ; ; .. };
sunRise: DateTime ;
sunSet: DateTime ;
temperatureHigh: Integer ;
temperatureLow: Integer - ;
url: String ;
windDirection: String ;
windSpeed: Integer .
WeatherReport , . :
currentLocation:Location ( );
currentSkyCode: String ( DayForecast);
currentTemperatureHigh: Integer , ( currentSkyCode);
|
|
currentTemperatureHigh: Integer , ( currentSkyCode);
currentTime: DateTime ( );
forecustList:[1..*] ( ).
WeatherReport , RSSParser, , WeatherReport DayForecast , forecastList WeatherReport DayForecast.
WeatherReport DayForecast - UserLocations, . getCurrentLocation UserLocations , setNewLocation, . UserLocations WeatherReport .
Location Location, UserLocations .
, , , . :
ReportViewer, : load ; showDetails , , ;showOptions update, .
Options, : addNewLocation, ; changeDataSource ; changeDateInterval , ; setNewUpdateTime, .
WeatherReport - .
, . 9
. 9. WeatherClock
2
1 | ( ) | ||||
2 | , , | ||||
2.1 | , , , :: .. | , . . . | |||
2.2 | + = public − = private # = protected | , . + (public) , ; # (protected) , ; - (private) . | |||
2.3 | int, string, float, employee | - , : ; , ; . | |||
2.4 | 0..1; 1;∗;1.. ∗; 2...4 | . | |||
2.5 | - : lr; + _ [1..2]: String; :Boolean; - : lr = (255, 0, 0) | (attribute) , , . , , . . | |||
2.5.1 | ; ; ; .. | , . | |||
2.5.2 | : lr = (255, 0, 0) Integer=25 | . | |||
2.5.3 | - | {readonly};{age=today-birthday} | - , . | ||
2.6 | +() + (: = , _: Color = (, , 255)) _():{ } | , . , - , . . . | |||
2.6.1 | , , , .. | , . | |||
2.6.2 | (in amount:Amount=100); (phone:String) | - , , . in (), out () inout (). . , . | |||
3 |
| ||||
3.1 | , , . , , . , , . | ||||
3.2 | , , | ||||
3.3 | "/", () (). | ||||
3.4 | (, ) (, ). , - , -, . | ||||
4 | |||||
5 | () | , | |||
6 | () | , |
|
|
9. (2 )
, .
, . .
:
;
;
.
, , - . ( , , ). , . , - .