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 an Iftzo.
Each Iftzo has its own tiss, which is a string. The value of tiss starts out as "ai". Anyone can ask an Iftzo for the value of its tiss. Anyone can set tiss to a new value.
All Iftzos share a single VEKIK_WEROS, which is a string. It is a constant. Its value is "ocsprur". Other classes can see its value.
An Iftzo can odlorize. This behavior adds "ero" to tiss. Anyone can ask an Iftzo to odlorize.
public class Iftzo {
private static String VEKIK_WEROS = "ocsprur";
private final String tiss;
public Iftzo() {
}
public String getTiss() {
return tiss;
}
private void setOdlorize() {
tiss += "ero";
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: