I'm working on a program that established methods for mean, med, mode, q1, q3, max and min. the last method should return a 5 number summary(min, q1, med, q3, max) as an array. Since I already have methods established and working properly for all of these I need a simple way to incorporate all these values into a new method and return as an array. I tried this
public static int calcNumsum(int[] a) {
int min;
int max;
int q1;
int q3;
int med;
int[] vals = new int[5];
vals[1] = min;
vals [2] = q1;
vals [3] = med;
vals [4] = q3;
vals [5] = max;
return vals;
it gave me back a compiling error int[] cannot be converted to int. any suggestions on how to fix this or a better way to return the array?