Question: Please Explain, Thanks. public class Point t private int x; private int y; public void setx(int x) this.x.x public void sety(int y) this.yey public void
public class Point t private int x; private int y; public void setx(int x) this.x.x public void sety(int y) this.yey public void setXY(int x, int y) x-yi Yay: public boolean IsEqual(Point p) return ((p.x .. x) && (p. y y) ); public void DisplayPoint () System.out.println("+xy: public void movePoint(int deltax, int deltay) (x is increased by deltax and y is increased by geltay public void SetLocation(Point P) (//make point to have the specified location P public static void main(Stringt] args) f // TODO Auto-generated method stub Point P1 new Point ); Point P2 new Point(); P1.setx(5); P1.sety (6); P2.setx(5); P2.setY(6); System.out.println(P1.IsEqual(P2)); P2.setXY (3,4); System.out.println(P1.IsEqual(P2))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
