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 Gantsoips.
All Gantsoipss share a single priui, which is a string. No other classes can directly ask for the value of priui. The value of priui starts out as "luntown" when the program starts. Every time a new Gantsoips is created, it adds "ses" to priui.
public class Gantsoips {
public static String priui;
public Gantsoips() {
priui += "ses";
}
public static void onStart() {
priui = "luntown";
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: