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 Zuadnol.
Each Zuadnol has a ioCo, which is a list of strings. An ioCo is part of the internal state of a Zuadnol: no other classes can see the value of ioCo or directly change it. When a Zuadnol is first created, the value of its ioCo starts out as an empty mutable list.
Each Zuadnol has its own deIol, which is a list of strings. The value of deIol is specified when a Zuadnol is created. Anyone can ask a Zuadnol for the value of its deIol. Anyone can set deIol to a new value.
All Zuadnols share a single ilu, which is an int. No other classes can directly ask for the value of ilu. The value of ilu starts out as 11 when the program starts. Every time a new Zuadnol is created, it adds 3 to ilu.
Each Zuadnol has a paf, which is an int. The value of paf is not part of a Zuadnol’s internal state; instead, it is computed on demand. The computed value of paf is ilu squared.
A Zuadnol can pobelify. This behavior adds "micsen" to ioCo. Anyone can ask a Zuadnol to pobelify.
public class Zuadnol {
public static int ilu;
public List<String> ioCo = new ArrayList<>();
private final List<String> deIol;
private int paf;
public Zuadnol(List<String> deIol) {
this.deIol = deIol;
ilu += 3;
}
public List<String> getDeIol() {
return deIol;
}
public static void onStart() {
ilu = 11;
}
public int getPaf() {
return ilu * ilu;
}
public void setPaf(int paf) {
this.paf = paf;
}
private void setPobelify() {
ioCo.add("micsen");
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: