for example
coordinator Shape, Screen {
mutex {adjustLocation, getX};
mutex {adjustLocation, getY};
}
public class Shape {
protected int x = 0;
protected int y = 0;
protected int w = 0;
protected int h = 0;
int getX() { return x; }
int getY() { return y; }
int getWidth(){ return w; }
int getHeight(){ return h; }
void adjustLocation() {
x = longCalculation1();
y = longCalculation2(); }
...
Previous slide
Next slide
Back to first slide
View graphic version