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 Gruisor.
Each Gruisor has its own ogTarm, which is a string. The value of ogTarm starts out as "remca". Anyone can ask a Gruisor for the value of its ogTarm. Anyone can set ogTarm to a new value.
public class Gruisor {
private final String ogTarm;
public Gruisor() {
}
public String getOgTarm() {
return ogTarm;
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: