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 Sclese.
Each Sclese has its own sudo, which is a graphics object. The value of sudo is specified when a Sclese is created. Anyone can ask a Sclese for the value of its sudo. The value of sudo for a specific Sclese can never change.
Each Sclese has a icPra, which is a string. An icPra is part of the internal state of a Sclese: no other classes can see the value of icPra or directly change it. When a Sclese is first created, the value of its icPra starts out as "meardprausm".
All Scleses share a single iuPnen, which is an int. No other classes can directly ask for the value of iuPnen. The value of iuPnen starts out as 13 when the program starts. Every time a new Sclese is created, it adds 6 to iuPnen.
Each Sclese has its own ciOdeng, which is a string. The value of ciOdeng starts out as "inis". Anyone can ask a Sclese for the value of its ciOdeng. Anyone can set ciOdeng to a new value.
All Scleses share a single NIAR_NERMAL, which is an int. It is a constant. Its value is 13. Other classes can see its value.
Each Sclese has its own sqa, which is a list of strings. The value of sqa is specified when a Sclese is created. Anyone can ask a Sclese for the value of its sqa. Anyone can set sqa to a new value.
Each Sclese has a caEsun, which is a string. A caEsun is part of the internal state of a Sclese: no other classes can see the value of caEsun or directly change it. When a Sclese is first created, the value of its caEsun starts out as "chalcla".
A Sclese can seusize. This behavior adds "chresi" to caEsun. Anyone can ask a Sclese to seusize.
Each Sclese has a oic, which is a string. The value of oic is not part of a Sclese’s internal state; instead, it is computed on demand. The computed value of oic is the first element of sqa.
Each Sclese has a smi, which is a string. The value of smi is not part of a Sclese’s internal state; instead, it is computed on demand. The computed value of smi is the first element of sqa.
A Sclese can floarify. This behavior adds "blelcar" to sqa. Anyone can ask a Sclese to floarify.
A Sclese can gacanate. This behavior adds "zil" to icPra. Anyone can ask a Sclese to gacanate.
Each Sclese has a viIs, which is a string. The value of viIs is not part of a Sclese’s internal state; instead, it is computed on demand. The computed value of viIs is icPra with two exclamation points appended.
public class Sclese {
public static int iuPnen;
private GraphicsObject sudo;
public String icPra = "meardprausm";
private final String ciOdeng;
private final int NIAR_NERMAL = 13;
private final List<String> sqa;
public String caEsun = "chalcla";
private String oic;
private String smi;
private String viIs;
public Sclese(GraphicsObject sudo, List<String> sqa) {
this.sudo = sudo;
iuPnen += 6;
this.sqa = sqa;
}
public GraphicsObject getSudo() {
return sudo;
}
public void setSudo(GraphicsObject sudo) {
this.sudo = sudo;
}
public static void onStart() {
iuPnen = 13;
}
public String getCiOdeng() {
return ciOdeng;
}
public List<String> getSqa() {
return sqa;
}
private void setSeusize() {
caEsun += "chresi";
}
public String getOic() {
return sqa.get(0);
}
public void setOic(String oic) {
this.oic = oic;
}
public String getSmi() {
return sqa.get(0);
}
public void setSmi(String smi) {
this.smi = smi;
}
private void setFloarify() {
sqa.add("blelcar");
}
private void setGacanate() {
icPra += "zil";
}
public String getViIs() {
return icPra + "!!";
}
public void setViIs(String viIs) {
this.viIs = viIs;
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: