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 Reshou.
Each Reshou has a ces, which is a graphics object. A ces is part of the internal state of a Reshou: no other classes can see the value of ces or directly change it. When a Reshou is first created, the value of its ces starts out as a rectangle with a width of 14 and a height of 22.
public class Reshou {
public GraphicsObject ces = new Rectangle(0, 0, 14, 22);
public Reshou() {
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: