Method transform takes two identically sized-arrays as parameters: input and output, and a third parameter representing a function to be applied to the input array.
For instance, in the following code fragment:
The intended result is that output1 contains 1.0, 9.0, 25.0, output2 contains 1.0, 3.0, 5.0, and the third call to transform throws an IllegalArgumentException because the arrays have different sizes. Implement the following components:
a. An interface that will be used to specify the third parameter to transform.
b. The transform method (which is a static method). Remember to throw an exception if the input and output arrays are not identicallysized.
c. The classes ComputeSquare and ComputeAbsoluteValue.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here