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 OstVousmscrod.
Each OstVousmscrod has a pha, which is an int. A pha is part of the internal state of an OstVousmscrod: no other classes can see the value of pha or directly change it. When an OstVousmscrod is first created, the value of its pha starts out as 17.
public class OstVousmscrod {
public int pha = 17;
public OstVousmscrod() {
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: