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.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!