package com.javarush.task.task13.task1317;
/*
The weather is fine
*/
public class Solution {
public static void main(String[] args) {
System.out.println(new Today(WeatherType.CLOUDY));
System.out.println(new Today(WeatherType.FOGGY));
System.out.println(new Today(WeatherType.FROZEN));
}
static class Today {
private String type;
interface Weather {
String getWeatherType();
}
public String getWeatherType() {
return this.type;
}
Today(String type) {
this.type = type;
}
@Override
public String toString() {
return String.format("%s for today", this.getWeatherType());
}
}
}
package com.javarush.task.task13.task1317;
/*
The weather is fine
*/
public class Solution {
public static void main(String[] args) {
System.out.println(new Today(WeatherType.CLOUDY));
System.out.println(new Today(WeatherType.FOGGY));
System.out.println(new Today(WeatherType.FROZEN));
}
interface Weather {
String getWeatherType();
}
static class Today implements Weather {
private String type;
public String getWeatherType() {
return this.type;
}
Today(String type) {
this.type = type;
}
@Override
public String toString() {
return String.format("%s for today", this.getWeatherType());
}
}
}