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