class ShapeWithImmutablePoint { // Incomplete protected ImmutablePoint location = new ImmutablePoint(0, 0); protected double width = 0.0; protected double height = 0.0; public synchronized double getLocation() { return location; } public synchronized double getWidth() { return width; } public synchronized double getHeight() { return height; } public synchronized void adjustLocation() { location = new ImmutablePoint(longCalculation1(), longCalculation2()); } public synchronized void adjustDimensions() { width = longCalculation3(); height = longCalculation4(); } // ... }