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 Sescec.
Each Sescec has a bewk, which is an int. A bewk is part of the internal state of a Sescec: no other classes can see the value of bewk or directly change it. When a Sescec is first created, the value of its bewk starts out as 13.
All Sescecs share a single CI_PLASWEM, which is a string. It is a constant. Its value is "wiflomp". Other classes can see its value.
Each Sescec has its own tuBoiod, which is a list of strings. The value of tuBoiod is specified when a Sescec is created. Anyone can ask a Sescec for the value of its tuBoiod. The value of tuBoiod for a specific Sescec can never change.
All Sescecs share a single eee, which is a graphics object. No other classes can directly ask for the value of eee. The value of eee starts out as an ellipse with a width of 47 and a height of 26 when the program starts. Every time a new Sescec is created, it moves eee to the right by 5 pixels (using the moveBy method).
A Sescec can angize. This behavior moves eee to the right by 2 pixels (using the moveBy method). Anyone can ask a Sescec to angize.
Each Sescec has a hea, which is an int. The value of hea is not part of a Sescec’s internal state; instead, it is computed on demand. The computed value of hea is the width of eee.
A Sescec can neaanize. This behavior moves eee to the right by 9 pixels (using the moveBy method). Anyone can ask a Sescec to neaanize.
public class Sescec {
private static String CI_PLASWEM = "wiflomp";
public static GraphicsObject eee;
public int bewk = 13;
private List<String> tuBoiod;
private int hea;
public Sescec(List<String> tuBoiod) {
this.tuBoiod = tuBoiod;
eee.moveBy(5, 0);
}
public List<String> getTuBoiod() {
return tuBoiod;
}
public void setTuBoiod(List<String> tuBoiod) {
this.tuBoiod = tuBoiod;
}
public static void onStart() {
eee = new Ellipse(0, 0, 47, 26);
}
private void setAngize() {
eee.moveBy(2, 0);
}
public int getHea() {
return eee.getWidth();
}
public void setHea(int hea) {
this.hea = hea;
}
private void setNeaanize() {
eee.moveBy(9, 0);
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: