Add interfaces for weather forecasting.

Co-Authored-By: os222
This commit is contained in:
Gleb Koval 2024-11-18 16:46:21 +00:00
parent 416d4caaed
commit 8d6c6415ac
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package ic.doc;
public interface WeatherForecast {
String summary();
int temperature();
}

View File

@ -0,0 +1,5 @@
package ic.doc;
public interface WeatherForecaster {
WeatherForecast forecastFor(WeatherRegion region, Weekday day);
}

View File

@ -0,0 +1,13 @@
package ic.doc;
public enum WeatherRegion {
BIRMINGHAM,
EDINBURGH,
GLASGOW,
LONDON,
MANCHESTER,
NORTH_ENGLAND,
SOUTH_WEST_ENGLAND,
SOUTH_EAST_ENGLAND,
WALES
}

View File

@ -0,0 +1,11 @@
package ic.doc;
public enum Weekday {
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
}