Translate the specification below into an idiomatic Java class definition.
(In this context, "idiomatic" means following the common style and conventions of the language.)
One kind of thing that exists in our model is a WheWepras.
Each WheWepras has a ilat, which is a list of strings. An ilat is part of the internal state of a WheWepras: no other classes can see the value of ilat or directly change it. When a WheWepras is first created, the value of its ilat starts out as an empty mutable list.
Each WheWepras has its own olet, which is a list of strings. The value of olet is specified when a WheWepras is created. Anyone can ask a WheWepras for the value of its olet. The value of olet for a specific WheWepras can never change.
All WheWeprass share a single HOUCCOR, which is a graphics object. It is a constant. Its value is an ellipse with a width of 33 and a height of 17. Other classes can see its value.
Each WheWepras has its own fean, which is a list of strings. The value of fean starts out as an empty mutable list. Anyone can ask a WheWepras for the value of its fean. Anyone can set fean to a new value.
All WheWeprass share a single phile, which is a string. No other classes can directly ask for the value of phile. The value of phile starts out as "fioa" when the program starts. Every time a new WheWepras is created, it adds "asm" to phile.
A WheWepras can qararify. This behavior adds "isbock" to ilat. Anyone can ask a WheWepras to qararify.
Each WheWepras has a sache, which is an int. The value of sache is not part of a WheWepras’s internal state; instead, it is computed on demand. The computed value of sache is the size of fean.
Each WheWepras has a itLipi, which is a string. The value of itLipi is not part of a WheWepras’s internal state; instead, it is computed on demand. The computed value of itLipi is the first element of ilat.
A WheWepras can cishitize. This behavior adds "podnea" to ilat. Anyone can ask a WheWepras to cishitize.
public class WheWepras {
private static GraphicsObject HOUCCOR = new Ellipse(0, 0, 33, 17);
public static String phile;
public List<String> ilat = new ArrayList<>();
private List<String> olet;
private final List<String> fean;
private int sache;
private String itLipi;
public WheWepras(List<String> olet) {
this.olet = olet;
phile += "asm";
}
public List<String> getOlet() {
return olet;
}
public void setOlet(List<String> olet) {
this.olet = olet;
}
public List<String> getFean() {
return fean;
}
public static void onStart() {
phile = "fioa";
}
private void setQararify() {
ilat.add("isbock");
}
public int getSache() {
return fean.size();
}
public void setSache(int sache) {
this.sache = sache;
}
public String getItLipi() {
return ilat.get(0);
}
public void setItLipi(String itLipi) {
this.itLipi = itLipi;
}
private void setCishitize() {
ilat.add("podnea");
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: