Example #1
0
        //Методы
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            Student otherStudent = obj as Student;

            if (otherStudent != null)
            {
                return(AverageMark.CompareTo(otherStudent.AverageMark));
            }
            else
            {
                throw new ArgumentException("Object is not a BSUIR Student");
            }
        }
Example #2
0
 public string ToShortString()
 {
     return("Student : " /*+ StudentData.ToString()*/ + "\tEducation :" + " " + "\tGroupID :" + GroupID.ToString()
            + "\tAvg. Mark : " + AverageMark.ToString());
 }
Example #3
0
        public override string GetInfo()
        {
            bool   isStipend = (Stipend > 0);
            string info      = GetFullName() + " - студент " + Course + "-го курса со средним баллом " + AverageMark.ToString("F2");

            if (isStipend)
            {
                info += " и со стипендией " + Stipend.ToString("F2") + " рублей";
            }
            else
            {
                info += ", не получает стипендии";
            }
            if (Debt != null)
            {
                info += "; имеется задолженность по предмету \"" + Debt + "\"";
            }
            if (DebtProfessor != null)
            {
                info += ", преподаватель принимающий пересдачу - " + DebtProfessor;
            }
            return(info);
        }