calculating the hypotenuse

I made a 70 on the follwing assignment:

Code:

`public class CalculatingTheHypotenuse`

{

public static void main(String[] args)

{

//Declaring the variables

Scanner input = new Scanner(System.in);

//requesting user input

System.out.println("Please enter both sides of the right triangle and I will calculate the hypotenuse.");

double x = input.nextDouble();

double y = input.nextDouble();

//Call for the hypot method

double z = hypot(x,y);

//Calculate the hypot and display it to screen

double w = Math.sqrt(z);

System.out.println("The hypotenuse is " + w);

}

//Method to multiple the sqaure of two number

//Parameters are the 2 values of the sides of the triangle to be squared then multiplied

public static double hypot(double side1, double side2)

{

return (side1 * side1) + (side2 * side2);

}

}

Here were my teacher's comments:

Your hypot method does NOT calculate the length of the hypotnuse. It needs to get the square root of the value it does compute (something you erroneously put in the main program). -30 points

Could someone explain this in detail for me with examples? I am not quite sure on what my instructor is saying.