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 Pliad.
Each Pliad has a feDopt, which is an int. A feDopt is part of the internal state of a Pliad: no other classes can see the value of feDopt or directly change it. When a Pliad is first created, the value of its feDopt starts out as 16.
All Pliads share a single SCAMI_PIPSOC, which is a string. It is a constant. Its value is "hioshoght". Other classes can see its value.
All Pliads share a single dooth, which is a string. No other classes can directly ask for the value of dooth. The value of dooth starts out as "tovi" when the program starts. Every time a new Pliad is created, it adds "sphaur" to dooth.
A Pliad can gehinate. This behavior adds 2 to feDopt. Anyone can ask a Pliad to gehinate.
Each Pliad has a taAuont, which is a string. The value of taAuont is not part of a Pliad’s internal state; instead, it is computed on demand. The computed value of taAuont is dooth with two exclamation points appended.
public class Pliad {
private static String SCAMI_PIPSOC = "hioshoght";
public static String dooth;
public int feDopt = 16;
private String taAuont;
public Pliad() {
dooth += "sphaur";
}
public static void onStart() {
dooth = "tovi";
}
private void setGehinate() {
feDopt += 2;
}
public String getTaAuont() {
return dooth + "!!";
}
public void setTaAuont(String taAuont) {
this.taAuont = taAuont;
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: