Question: this should be written in java 2. Create a class called Euclid which does the following: - A main method that - prompts the user

this should be written in java
this should be written in java 2. Create a class called Euclid

2. Create a class called Euclid which does the following: - A main method that - prompts the user for 2d distance or 3d distance (int would be fine with 2 or 3 as the option) - Gets the coordinate sets between the two points. The User will input doubles. They will need to enter 4 values for 2D(x,y) and 6 values for 3D(x,y,z). - Calls the "distance" method to calculate the Euclidian distance between the two points - There are two static methods called "distance". (Both must called be called 'distance') - Both methods will return a double which is the distance between the two points - One of the distance methods will have 4 double parameters. The other distance method will have 6 double parameters. The formula for the 2d distance is: (x2x1)2+(y2y1)2 The formula for 3d distance is: d=(x1x0)2+(y1y0)2+(z1z0)2 - This will then return control to the main method which will print out the distance between the two points

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!