Question: 1. Write a class called ArrayCalculations that does the following: o Declares an integer array named data with the elements 7,-1, 24, and 6. Use

 1. Write a class called ArrayCalculations that does the following: o

1. Write a class called ArrayCalculations that does the following: o Declares an integer array named data with the elements 7,-1, 24, and 6. Use only one statement to declare and initialize the array. o Calculates and prints the maximum value in the array o Calculates and prints the minimum value in the array. o Calculates and prints the sum of all the elements in the array. o Calculates and prints the average (a double) of all the elements in the array. Please label your output (no specific format required). The numbers in the array initialization statement are not considered to be magic numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!