Hi experts!
I have a program the i need to write...
i need to write a program that meets the following requirements:
• Define a class named Point with two data fields, x and y, to represent a point's x and y coordinates. Implement the Comparable interface for comparing the points on x-coordinates and on y-coordinates if x-coordinates are identical.
• Define a class named CompareY that implements Comparator<Point>. Implement the compare method to compare two points on their y-coordinates and on their x-coordinates if y-coordinates are identical.
• Randomly create 100 points and apply the Array.sorts method to display the points in increasing order of their x-coordinates and in increasing order of their y-coordinates, respectively.
it has to have a Minimum of three classes, Array.sorts method, collections, selections and methods...
can anyone help me?