public override int Exam(string name) { Examen examen = GetOrAddExamen(name); if (examen.Limit()) { return(examen.Exam(2, 5)); } else { return(-1); } }
public override int Exam(string name) { Examen examen = GetOrAddExamen(name); if (examen.LastAttempt()) { return(examen.grade = 3); } else { return(examen.Exam(2, 5)); } }
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); }
public override int Exam(string name) { Examen examen = GetOrAddExamen(name); return(examen.Exam(4, 5)); }