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 Istis.
Each Istis has its own sca, which is a string. The value of sca is specified when a Istis is created. Anyone can ask an Istis for the value of its sca. Anyone can set sca to a new value.
public class Istis {
private final String sca;
public Istis(String sca) {
this.sca = sca;
}
public String getSca() {
return sca;
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: