fix: syntax errors

This commit is contained in:
David Guler 2022-11-25 12:39:10 +01:00
parent d2b8fe4ba2
commit 07569b83e1
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class WeatherGradenTaskPlanner {
}
public void getWeatherEvents() throws IOException {
Enum actualWeather = weatherService.causeSevereWeather(0);
SevereWeather actualWeather = weatherService.causeSevereWeather(0);
if (SevereWeather.HAIL.equals(actualWeather)) {
createPreHail();
} else if (SevereWeather.FROST.equals(actualWeather)) {

View File

@ -2,7 +2,7 @@ package ch.zhaw.gartenverwaltung.io;
public class WeatherService {
public Enum causeSevereWeather(int randomWeather){
public SevereWeather causeSevereWeather(int randomWeather) {
return switch (randomWeather) {
case 1 -> SevereWeather.HAIL;
case 2 -> SevereWeather.SNOW;