Пример #1
0
        public override int Exam(string name)
        {
            Examen examen = GetOrAddExamen(name);

            if (examen.Limit())
            {
                return(examen.Exam(2, 5));
            }
            else
            {
                return(-1);
            }
        }
Пример #2
0
        public override int Exam(string name)
        {
            Examen examen = GetOrAddExamen(name);

            if (examen.LastAttempt())
            {
                return(examen.grade = 3);
            }
            else
            {
                return(examen.Exam(2, 5));
            }
        }
Пример #3
0
        public Examen GetOrAddExamen(string name)
        {
            foreach (Examen ex in examens)
            {
                if (ex.name == name)
                {
                    return(ex);
                }
            }
            Examen examen = new Examen(name);

            examens.Add(examen);
            return(examen);
        }
Пример #4
0
        public override int Exam(string name)
        {
            Examen examen = GetOrAddExamen(name);

            return(examen.Exam(4, 5));
        }