Hi,
In swap function
temp = this.X;
this.X = this.Y;
this.Y = temp;

and in the demoswap function the last two lines should display The value of X as tempZ.getX() and the value of Y as...