Assume the availability of class named IMath that provides a static method, toThePowerOf which accepts two int arguments and returns the value of the first parameter raised to the power of the second.An int variable cubeSide has already been declared and initialized. Another int variable, cubeVolume, has already been declared.Write a statement that calls toThePowerOf to compute the value of cubeSide raised to the power of 3 and that stores this value in cubeVolume.

Respuesta :

CPED

Answer:

cubeVolume = IMath.toThePowerOf(cubeSide, 3);

Explanation:

Following is the explanation for above statement:

Left side:

cubeVolume is a variable with data-type int, it will store the integer value that is the output from right side.

Right side:

  • IMath is the class name.
  • toThePowerOf is the built-in function that takes two arguments of data type int. First is the base and second is the power(exponent) separated by comma. In place of first argument that is the base variable we will pass the variable cubeSide that has been declared and initialize.
  • Now the output will be stored in the variable cubeVolume.

i hope it will help you!