Question: The task is to create a class called SomeStats that has static methods that search a random integer array to find the following: findSum :

The task is to create a class called SomeStats that has static methods that search a random integer array to find the following:

findSum : finds and returns the sum of the values

findAverage: finds and returns the mean of the values

findMode: finds and returns the mode of the values.

Code for random integer array:

public static int[] createIntArray(){ Scanner scanner=new Scanner(System.in); System.out.println("Enter size of array: "); int size=scanner.nextInt(); System.out.println("Enter max number: "); int maxNum=scanner.nextInt(); int[] array=new int[size]; for (int i=0;i 

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!