public void AddPupil(Pupil pupil) { this.pupils.Add(pupil); }
private void PopulateClassroom(Classroom classroom) { Pupil firstPupil = new Pupil("John Walter"); firstPupil.AddSubject("Mathematics", new decimal[] { 9m, 7m, 8.5m });// 8.16 firstPupil.AddSubject("History", new decimal[] { 7.5m, 8m, 8.5m });// 8 firstPupil.AddSubject("Music", new decimal[] { 9.5m, 9m, 10m });//9.5 firstPupil.AddSubject("Literature", new decimal[] { 9.5m, 9.5m, 10m });//9.6 classroom.AddPupil(firstPupil);//8.81 Pupil secondPupil = new Pupil("Tom Hans"); secondPupil.AddSubject("Mathematics", new decimal[] { 10m, 8.5m, 7.5m });//8.6 secondPupil.AddSubject("History", new decimal[] { 9.5m, 10m, 10m });//9.83 secondPupil.AddSubject("Music", new decimal[] { 10m, 9m, 9m });//9.3 secondPupil.AddSubject("Literature", new decimal[] { 10m, 9.5m, 10m });//9.83 classroom.AddPupil(secondPupil);//9.4 Pupil thirdPupil = new Pupil("Mark Harris"); thirdPupil.AddSubject("Mathematics", new decimal[] { 9.5m, 10m, 9.5m });//9.6 thirdPupil.AddSubject("History", new decimal[] { 6.5m, 8m, 8m });//7.5 thirdPupil.AddSubject("Music", new decimal[] { 9.5m, 9m, 10m });//9.5 thirdPupil.AddSubject("Literature", new decimal[] { 8m, 8.5m, 7m });//7.83 classroom.AddPupil(thirdPupil);//8.6 Pupil fourthPupil = new Pupil("John Smith"); fourthPupil.AddSubject("Mathematics", new decimal[] { 7.5m, 8m, 9m });//8.16 fourthPupil.AddSubject("History", new decimal[] { 8.5m, 8m, 9m });//8.5 fourthPupil.AddSubject("Music", new decimal[] { 8.5m, 9.5m, 10m });//9.3 fourthPupil.AddSubject("Literature", new decimal[] { 10m, 10m, 9m });//9.6 classroom.AddPupil(fourthPupil);//8.89 }