Write the definition of a method powerTo, which receives two parameters. The first is a double and the second is an int. The method returns a double.

Write the definition of a method powerTo, which receives two parameters. The first is a double and the second is an int. The method returns a double.

LANGUAGE: JAVA

CHALLENGE:

Write the definition of a method powerTo, which receives two parameters. The first is a double and the second is an int. The method returns a double.

If the second parameter is negative, the method returns zero. Otherwise it returns the value of the first parameter raised to the power of the second parameter.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level