By using Java Language: A point in the 2D is represented by a pair (x, y). To
Question:
By using Java Language: A point in the 2D is represented by a pair (x, y). To represent a group o... (1 bookmark) Flag By using Java Language: A point in the 2D is represented by a pair (x, y). To represent a group of points, a 2D array is devised where the first column contains x and the second column contains y as show in the figure below. (-1,3) (3,3) (4,2) X у (1,1) Line 1 . (2,0.5) Line 2 . (4,-0.5) 0 -1 1 -1 2 1 3 2 4 2 5 3 6 4 7 4 3 -1 1 0.5 -1 3 2 -0.5 (-1, Write a java program that: Prompts the user to enter an even integer (n) which is divisible by 4. Prompt the user to enter n integer values that represent the coordinates of the points in the 2D plane which means we have n/2 points. save the coordinates of the points in a 2D array where duplicates are NOT allowed. Use every two points to get the line equation that pass through these two points. For example in the figure provided, 4 line equations will be constructed where every point is used only once. The equation of the line is : y = mx + b where m is the slope and computed as m = (y2-y1) / (x2-x1) and the y-intercept is computed as b = -mx1 + y1 Design a menu to the user so that he can choose from as follows where the menu is presented to user as long as he does not select 7: 1. Get points. 2. Display points. 3. Shuffle points. 4. Display line equations. 5. Display right most lowest point. 6. Display slope of lines. 7. exit.