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