Skip to content

Instantly share code, notes, and snippets.

@apietras
Created October 18, 2016 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apietras/3e5c39b00f5d47bfa35026874ca5df5e to your computer and use it in GitHub Desktop.
Save apietras/3e5c39b00f5d47bfa35026874ca5df5e to your computer and use it in GitHub Desktop.
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