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 Biongbism.
Each Biongbism has a bimu, which is a list of strings. A bimu is part of the internal state of a Biongbism: no other classes can see the value of bimu or directly change it. When a Biongbism is first created, the value of its bimu starts out as an empty mutable list.
Each Biongbism has its own recil, which is a list of strings. The value of recil starts out as an empty mutable list. Anyone can ask a Biongbism for the value of its recil. Anyone can set recil to a new value.
A Biongbism can bicilize. This behavior adds "olprir" to recil. Anyone can ask a Biongbism to bicilize.
public class Biongbism {
public List<String> bimu = new ArrayList<>();
private final List<String> recil;
public Biongbism() {
}
public List<String> getRecil() {
return recil;
}
private void setBicilize() {
recil.add("olprir");
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: