Question: Please help need ASAP JAVA Create a class with the following specification. Name: Point2D.java (2 points) Instance Variables: int x, int y (3 points each)Constructors:
Please help need ASAP JAVA Create a class with the following specification.
Name: Point2D.java (2 points) Instance Variables: int x, int y (3 points each)Constructors: Point2D() Point2D(int x, int y ) (3 points each)Accessor Methods: getX() returns int get Y() returns int (3 points each)Mutator methods: setX() setY0 (3 points)toString() method: Returns the String: "( x,y) " where x and y are the values of the instance variables (3 points) compare(Object otherObj) methods: Checks to see if the x and y coordinates are equal, if they are, return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
