Question: QUESTION 42 Write a Java program named RandomNumbers that creates a single-dimensional array (call it dataArray) of int of size 20 and initialize its elements
QUESTION 42 Write a Java program named RandomNumbers that creates a single-dimensional array (call it dataArray) of int of size 20 and initialize its elements with 20 random integers (their range must be between 1 and 100 inclusive). (1 mark) a) Write 2 methods to compute the mean and the standard deviation of the data saved in dataArray. The header of the methods are as follows: (2 marks) ** Compute the mean of an array of double values */ public static double mean(int[] x) /** Compute the deviation of double values / public static double deviation(int[] x) The mean and standard deviation of a set of n numbers are given as: - mean) + deviation - V 1 mean 1 11 Save At Ans Click Save and to and submit. chio: Sue Ass to save all anston te o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
