Beispiel #1
0
        public virtual void SetRandGroupGrade(Group group, string subject, int successFactor = 0)
        {
            int luckNow    = 0;
            int randNum    = 0;
            int evaluation = 0;

            luckNow = CountLuck(group.Students.Count, successFactor);
            foreach (Student student in group.Students)
            {
                randNum = rand.Next(0, 30);
                if (randNum < 8)
                {
                    luckNow += student.Luck;
                    if (!CheckSub(student, subject))
                    {
                        student.Evaluations.Add(subject, new List <int>());
                    }
                    evaluation = GetGrade(luckNow);
                    if (evaluation == 0)
                    {
                        evaluation = 2;
                    }
                    GetMark?.Invoke(student.ToString() + " : " + evaluation);
                    student.Evaluations[subject].Add(evaluation);
                }
            }
        }
Beispiel #2
0
        public void SetAverageMark(Group group, string subject)
        {
            int evaluation = 0;

            foreach (Student student in group.Students)
            {
                evaluation = GetAverageMark(student, subject);
                GetMark?.Invoke(student.ToString() + " : " + evaluation);
                student.Evaluations[subject].Add(evaluation);
            }
        }
Beispiel #3
0
        public void EnglishLesson( )
        {
            Console.WriteLine("choose an extra word" +
                              "\n1.Pelican" +
                              "\n2.Owl" +
                              "\n3.Bear");
            int choice = Convert.ToInt32(Console.ReadLine());

            if (choice <= 0 || choice > 3)
            {
                throw new ArgumentOutOfRangeException();                    //генерируем исключительную ситуацию
            }
            GetMark?.Invoke(choice);
        }
Beispiel #4
0
        public virtual void SetGrades(Student student, string subject, int studentCount = 0, int boost = 0)
        {
            int luckNow    = 0;
            int evaluation = 0;

            luckNow  = CountLuck(studentCount, boost);
            luckNow += student.Luck;
            if (!CheckSub(student, subject))
            {
                student.Evaluations.Add(subject, new List <int>());
            }
            evaluation = GetGrade(luckNow);
            GetMark?.Invoke(student.ToString() + " : " + evaluation);
            student.Evaluations[subject].Add(evaluation);
        }
Beispiel #5
0
 public void Neglect(Student student, string subject)
 {
     GetMark?.Invoke(student.ToString() + " : " + 0);
     student.Evaluations[subject].Add(0);
 }
Beispiel #6
0
 protected void CallGetMarkHandler(string message)
 {
     GetMark?.Invoke(message);
 }