Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started