public Stats CalculateStatistics(List <double> numbers) { //Implement statistics here Stats st = new Stats(); average = st.CalculateAvg(numbers); min = st.CalculateMin(numbers); max = st.CalculateMax(numbers); return(st); }
public Stats CalculateStatistics(List <float> numbers) { //Implement statistics here Stats stats = new Stats(); if (numbers.Count == 0) { stats.average = float.NaN; stats.min = float.NaN; stats.max = float.NaN; return(stats); } else { stats.CalculateAverage(numbers); stats.CalculateMin(numbers); stats.CalculateMax(numbers); return(stats); } }