Ejemplo n.º 1
0
 /// <summary>
 /// fill this object with data
 /// </summary>
 /// <param name="studentModel">input data</param>
 public void LoadData(StudentModel studentModel)
 {
     this.Name    = studentModel.Name;
     this.Math    = studentModel.Math;
     this.Physics = studentModel.Physics;
     this.English = studentModel.English;
     this.Average = StudentCalculation.CalcAverageAll(studentModel);
 }
 /// <summary>
 /// fill model with data from <see cref="StudentModel"/> & calculate rest
 /// </summary>
 /// <param name="group"></param>
 public void LoadData(StudentGroup group)
 {
     this.AverageMath    = StudentCalculation.CalcAverageMath(group.StudentList);
     this.AveragePhysics = StudentCalculation.CalcAveragePhys(group.StudentList);
     this.AverageEnglish = StudentCalculation.CalcAverageEngl(group.StudentList);
     this.MedianMath     = StudentCalculation.CalcMedianMath(group.StudentList);
     this.MedianPhysics  = StudentCalculation.CalcMedianPhys(group.StudentList);
     this.MedianEnglish  = StudentCalculation.CalcMedianEngl(group.StudentList);
     this.ModusMath      = StudentCalculation.CalcModusMath(group.StudentList);
     this.ModusPhysics   = StudentCalculation.CalcModusPhys(group.StudentList);
     this.ModusEnglish   = StudentCalculation.CalcModusEngl(group.StudentList);
 }