Question: Question 1:Create a class with the following specification (Total Points: 26) (If you can't fit your code here, just copy and paste it into a
Question 1:Create a class with the following specification (Total Points: 26) (If you can't fit your code here, just copy and paste it into a google doc and submit the attachment) Name: Point2D.java ( 2 points) Instance Variables: int x, int y (3 points each)Constructors: Point2D0 Point2D(int x, int y) (3 points each)Accessor Methods: getX0 returns int getY 0 returns int ( 3 points each)Mutator methods: setx0 setY 0 (3 points)toString 0 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
