Question: import java.text.DecimalFormat; import java.util.Random; public class RightTriangle { public static final double CONSTANT = 2 . 0 ; public static void main ( String [
import java.text.DecimalFormat;
import java.util.Random;
public class RightTriangle
public static final double CONSTANT ;
public static void mainString args
Random rand new Random;
double base rand.nextDouble;
double height rand.nextDouble;
double hypotenuse Math.sqrtMathpowbase CONSTANT Math.powheight CONSTANT;
DecimalFormat df new DecimalFormat;
System.out.printlnBase: dfformatbase;
System.out.printlnHeight: dfformatheight;
System.out.printlnHypotenuse: dfformathypotenuse;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
