CMIS 141
Homework
Write a program generates random points, meaning (x,y) Cartesian plane
kind of points.
Generate a user-specified number of them. Use two int arrays to hold
the X and Y coordinates of the points. The x and y coordinates of the
points range from 0 to user-specified maximums (separate values for
the x and y max values).
Display the points in a JTextArea if the user wants to see them. Use
the conventional (x,y) notation to show each point's coordinates.
Indicate the "leftmost", "rightmost", "topmost" and "bottommost"
points. These are the points with the smallest x, largest x, largest
y, and smallest y coordinates, respectively.
Display the sum of the distances between all of the points, the
maximum distance, minimum distance, and average distance between the
points.
Distance between two points (x1,y1) and (x2,y2) (i.e. the length
of the line connecting them) is the Pythagorean distance formula:
sqrt((x1-x2)squared + (y1-y2)squared)
Extra credit if the points and their conencting lines are drawn, say
in an applet using fillRect and drawLine.