The multHypot method is supposed to take three parameters, and return the product of the first parameter and the length of the hypotenuse of a right triangle in which the two sides adjacent to the right angle have the lengths given by the second and third parameters. Assume that the multHypot method is invoked elsewhere in the program with this statement: System.out.println(multHypot(i, j, k));, where i, j, and k are doubles.
double multHypot(double factor, double side1, double side2)
{
// get length of hypotenuse
double hyp = java.lang.Math.pow(side1*side1+side1*side2, 0.5);
// multiply it by factor and return the result
return factor * hyp;
}