Question: Using java programm Q1) Static methods/ Arrays (Calculating sum, average and standard deviation) Write a program that calculates the sum, average and standard deviation for
Q1) Static methods/ Arrays (Calculating sum, average and standard deviation) Write a program that calculates the sum, average and standard deviation for a set of integers given by a user. The program should hold the se integers in an amay and use static methods for calculations. The static methods are the following: a. Static method calcSum takes an array of integers as an input and calculates and retums the sum of elements to the caller. b. Static method calcAveragetakes an array of integers as an input and calculates and returns the average (It should use the sum result from calcSum ) method). Static method cales TDV ( ) takes an array of integers as an input and calculates and retums the standard deviation (It should use the average result from calcAverage method) c. At the start, the program should ask the user for the number of integers and then ask them to enter those integers one by one Use the following link for standard deviation calculation steps. https://www Example Execution (user input ingreen) Please enter the number of elements: Enter element 1: 6 Enter element 2: 10 Enter element 3: 15 Sum: 3 Average: 10.33 STDV: 2.80
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
