Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
KobietydoKodu: Tygodniowe Wyzwanie Programistyczne - zadanie #5 - początkujący - cz II
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