public void AnnounceNewTraining(string trainingName, int duration, DateTime start) { if (trainingName == null) { throw new ArgumentNullException($"{nameof(trainingName)}"); } ManagementSystem.AddTraining(trainingName, duration, start, this); }
/// <summary> /// Training is closed after all students get their marks /// </summary> public void CloseTraining(Training training) { Random r = new Random(); training.IsClosed = true; foreach (var student in training.GetStudents()) { AssignAGradeTo(student, (byte)r.Next(1, 11)); } ManagementSystem.AddTrainingToArchive(training); }