1. Write a method that copiesnelements from the front of one integer array to the front of another. The two arrays and the numbernare all arguments to the method. Include a precondition/postcondition contract as part of your implementation.
2. Write a Java method called zero_some with one parameter x that is an array of double numbers. The method changes x[0], x[2], x[4], ... , all to zero. If you activate zero_some(a) for an actual array a of length 6, which components of a will be changed to zero?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here