The Class LSPoint
import java.util.Random;
public class LSPoint {
int x, y;
static Random rg = new Random();
public LSPoint() {
x = Math.abs(rg.nextInt()) % 200;
y = Math.abs(rg.nextInt()) % 200;
}
public LSPoint(int xVal, int yVal) {
x = xVal;
y = yVal;
}
public int getX() { return x; }
public int getY() { return y; }
}
Previous slide
Next slide
Back to first slide
View graphic version