1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
class Pos { int x = 0; int y = 0; int getX() { return(x); } int getY() { return(y); } void move(int newX, int newY) { x=newX; y=newY; } }