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 Puned.
All Puneds share a single SMI_NEETH, which is a graphics object. It is a constant. Its value is a rectangle with a width of 49 and a height of 44. Other classes can see its value.
public class Puned {
private static GraphicsObject SMI_NEETH = new Rectangle(0, 0, 49, 44);
public Puned() {
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: