-
-
Save apietras/3e5c39b00f5d47bfa35026874ca5df5e to your computer and use it in GitHub Desktop.
KobietydoKodu: Tygodniowe Wyzwanie Programistyczne - zadanie #5 - początkujący - cz II
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WeatherTeller { | |
public static String CITY = "Warsaw"; | |
public void tellWeather() { | |
Weather weather = WeatherForecastService.getForecast(CITY); | |
if (weather.getChanceOfRain() > 50.0) { | |
System.out.println("You have to take umbrella!"); | |
} else if (weather.getChanceOfRain() > 30.0) { | |
System.out.println("You should consider taking umbrella"); | |
} else { | |
System.out.println("Enjoy sunny day!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment