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 Skism.
Each Skism has its own nin, which is a list of strings. The value of nin starts out as an empty mutable list. Anyone can ask a Skism for the value of its nin. Anyone can set nin to a new value.
All Skisms share a single IASSBI, which is a graphics object. It is a constant. Its value is an ellipse with a width of 12 and a height of 23. Other classes cannot see its value.
A Skism can chulize. This behavior adds "ma" to nin. Anyone can ask a Skism to chulize.
public class Skism {
public static GraphicsObject IASSBI = new Ellipse(0, 0, 12, 23);
private final List<String> nin;
public Skism() {
}
public List<String> getNin() {
return nin;
}
private void setChulize() {
nin.add("ma");
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: