class Geometric extends Mean { double calcMean(double[] nums){ double agg = 1.0; // agg stands for aggregate for(int i = 0; i < nums.length; i++) agg *= nums[i]; return Math.pow(agg, 1.0/nums.length); } }