feat(uml): add uml source
This commit is contained in:
parent
3ae4e63a71
commit
f5358ae69c
1
diagram_class.puml
Normal file
1
diagram_class.puml
Normal file
@ -0,0 +1 @@
|
||||
@startuml
title Weather App
note "Getters, setters and constructors are not displayed" as N
package eirb.pg203 {
Interface WeatherDataAPI {
+ WeatherData getTemperature(int day, String city)
+ WeatherData getTemperature(int day, int hour, String city)
+ WeatherData getTemperatures(int days, String city)
+ String getAPIName()
}
Interface WeatherDisplay {
+ void display(int days, String city)
+ void addAPI(WeatherDataAPI w)
}
Exception exceptions.WeatherFeatchingException {
}
Exception exceptions.WeatherFeatchingExceptionApi extends exceptions.WeatherFeatchingException{
}
Exception exceptions.WeatherFeatchingExceptionCityCoords extends exceptions.WeatherFeatchingException{
}
Class utils.Coords {
- float lat
- float lon
}
Class utils.JSONFetcher {
+ fetch(URL url)
- private {static} fetchString(URL url)
}
Class City {
- String cityName
- utils.Coords cityCoords
~ JSONFetcher JSONFetcher
- private Coords getCoordsFromName(String cityName)
+ public String toString()
}
Class WeatherData {
- City city
- Instant date
- float temp
- Condition condition
- float windSpeed
- float windDirectionAngle
- WindDirection windDirection
+ String toString()
}
Class WeatherDisplayBasic implements WeatherDisplay {
- ArrayList<WeatherDataAPI> apis
- double getColumnSize()
- void displayHeader(int days, double sourceColumnSize, double dayColumnSize)
- void displayWeatherDatas(String apiName, ArrayList<WeatherData> weatherDatas, String startColumnSize, double sourceColumnSize, double dayColumnSize)
- void displaySeparatorLine(int days, double sourceColumnSize, double dayColumnSize)
- void displayAllWeatherDatas()
}
Class OpenMeteo implements WeatherDataAPI {
- String {final} forecastBaseUrl
- String {final} daylyQuery
~ JSONFetcher JSONFetcher
~ Clock clock
- JSONObject fetchWeather(int days, City city)
- Condition {static} getConditionFromCode(int WMOCode)
- WeatherData getWeatherDataFromForecast(JSONObject response, int day, String city)
}
Class OpenWeatherMap implements WeatherDataAPI {
- String {static} forecastBaseUrl
- String APIKey
~ Clock clock
~ JSONFetcher JSONFetcher
- WeatherData getWeatherDataFromForecast(JSONObject response, int day, String city)
- JSONObject fetchWeather(City city)
}
Class WeatherAPI implements WeatherDataAPI {
- String APIKey
- String {static} forecastBaseUrl
~ JSONFetcher JSONFetcher
- JSONObject fetchWeather(int days, String city)
- WeatherData.Condition {static} getConditionFromString(String str)
- WeatherData {static} getWeatherDataFromForecast(JSONObject response, int day, String city)
}
}
Exception Exception
Exception <|-- WeatherFeatchingException
@enduml
|
Loading…
x
Reference in New Issue
Block a user