COS126 Function Activity - 2.1• Group Activity: Arrays, Standard Input, Functions (Static Methods)1. Write a program Maxi which inputs three integers x, y, z from standard input,and calls a function max3() which takes 3 integer arguments and returns the value ofthe largest one. Print the largest integer. (Assume the function max3 is in the classMaxi.)public class Maxi {// methods will go herepublic static void main(String[] args) {// Input three integers from standard input// Call the function max3(a, b, c) and print the result}}2. Write the function max3() to return the largest of three integers. (Exercise 2.1.1)public static __________ max3(___________________________________________) {}13. Write another function max3() to return the largest of three doubles. (Exercise 2.1.1)public static __________ max3(_________________________________) {}4. Write a method reverse1() that takes a String array as an argument, and returns anew String array which holds the reverse of the argument array. DO NOT ALTER theoriginal array. ( Web Exercise 2.1.35)public static _______ reverse1(__________________________________) {}5. Use the code from page 89 or Booksite Ex.1.4.4 to write a function reverse2() toreverse the elements in a String array. The array is an argument of the method. Themethod does not return anything. It reverses the original array. (Web Exercise2.1.35)Recommended book exercises: 2.1.3, 2.1.4, 2.1.13,
View Full Document