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