Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program should also have the following methods: .getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array, • GetAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. • GetHighest. This method should accept a one-dimensional array as its argument and return the highest of the values in the array Getlowest. This method should accept a one-dimensional array as its argument and return the lowest of the values in the array. Demonstrate each of the methods in the program using the data from the following four one-dimensional arrays. Show transcribed image text Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The program should also have the following methods: .getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array, • GetAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. • GetHighest. This method should accept a one-dimensional array as its argument and return the highest of the values in the array Getlowest. This method should accept a one-dimensional array as its argument and return the lowest of the values in the array. Demonstrate each of the methods in the program using the data from the following four one-dimensional arrays.
Expert Answer
Answer to Write a program with an array that is initialized with test data. Use any primitive data type of your choice. The progra…