Question: (1) (6 points) Write a class Point that has x and y coordinates as private data. Write a constructor for the class and a toString

(1) (6 points) Write a class Point that has x and y coordinates as private data. Write a constructor for the class and a toString method. Write a main() method that uses the constructor to set a Point object to x = 2, x=3 and uses the toString method to display the coordinates of the Point object via System.out.println(objectname)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
