public double CalculateAverage(List <double> values, AbstractAveragingMethod averagingMethod)
        {
            if (values == null)
            {
                throw new ArgumentNullException(nameof(values), "can`t be null");
            }

            if (averagingMethod == null)
            {
                throw new ArgumentNullException(nameof(averagingMethod), "can`t be null");
            }

            return(averagingMethod.Calculate(values));
        }
        public double CalculateAverage(ICollection <double> values, AbstractAveragingMethod averagingMethod)
        {
            if (values == null)
            {
                throw  new ArgumentNullException(nameof(values));
            }

            if (averagingMethod == null)
            {
                throw  new ArgumentNullException(nameof(averagingMethod));
            }

            return(averagingMethod.FindAverage(values));
        }