public override GradeBookStatistic GetGradeBookStatistics()
        {
            var stats = new GradeBookStatistic();

            foreach (var grade in _grades)
            {
                stats.Add(grade);
            }

            return(stats);
        }
예제 #2
0
        public override GradeBookStatistic GetGradeBookStatistics()
        {
            var stats = new GradeBookStatistic();

            using (var reader = File.OpenText($"{Name}.txt"))
            {
                while (!reader.EndOfStream)
                {
                    stats.Add(double.Parse(reader.ReadLine()));
                }
            }
            return(stats);
        }