Question: Write a Java program which will allow the user to enter a set of points from the 2D Cartesian plane and find out certain things

Write a Java program which will allow the user to enter a set of points from the 2D Cartesian plane and find out certain things about this set of points. The user gets to choose how many points they want to enter during any given run of the program as long as they enter 3 or more points. The program should store the points entered by the user in a object. After the points are entered by the user, the user gets to choose from the following menu items. The functionality for the menu items should be implemented as methods in your PointList class:

1. Determine if 3 points can create a triangle and the type of triangle it would be.

2. Determine the point which is the farthest outlier to the other points.

3. Find the upper left and lower right points of the smallest rectangle that can contain all the points

4. Exit

Here are some additional implementation details for the 3 menu items: 1. The user should be able to pick the 3 points they want to use. If you determine a triangle can be made, tell the user that and output whether the triangle is acute, right, or obtuse. If a triangle can't be formed, tell the user it can't be formed.

2. The farthest outlier can be determined by the largest total distance to all other points.

3. The points can be on the edge of the rectangle you find.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!