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 Firdi.
Each Firdi has its own irad, which is a list of strings. The value of irad starts out as an empty mutable list. Anyone can ask a Firdi for the value of its irad. Anyone can set irad to a new value.
All Firdis share a single OR_BRAUN, which is a graphics object. It is a constant. Its value is a rectangle with a width of 26 and a height of 21. Other classes cannot see its value.
A Firdi can sehonify. This behavior adds "phont" to irad. Anyone can ask a Firdi to sehonify.
public class Firdi {
public static GraphicsObject OR_BRAUN = new Rectangle(0, 0, 26, 21);
private final List<String> irad;
public Firdi() {
}
public List<String> getIrad() {
return irad;
}
private void setSehonify() {
irad.add("phont");
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: