Question: So for my computer programming class I'm using java and the assignment's instructions is to use imputed coordinates and calculate the distance between them, I

So for my computer programming class I'm using java and the assignment's instructions is to use imputed coordinates and calculate the distance between them, I have the program all figured out but the assignment also calls for a try/catch to be used. It is to be used so that the inputed values cannot go outside the bounds of (-10,10) how would I implement that using a try/catch?
 So for my computer programming class I'm using java and the

1400 jGRASP CSD Java) ndow Help import java util. Scanner; public class Distance public static void main (String args) Scanner input new Scanner (System.in) System.out.print Enter first two points (x1, yl) :")1 double x1 input. next Double double yl input.nextDouble o L System. out print Enter second two points (x2, y 2) double x2 input. next Double double y2 input next Double double distance Math.pow ((x2 x1) (x2 x1) t (y2 yl) (y2 yl)) 0.5) System. out.print ("The distance of the two points is distance) Pig Latin ja uessing... FXML Assignme. FXML Assignme. Dice Java

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!