public Votazione TrovaVotoMassimo() { double max = 0; Materia maxm = new Materia(""); Studente maxs = new Studente(" ", " "); Votazione massimo = new Votazione(maxm, maxs, 0); for (int i = 0; i < Voti.Count; i++) { if (Voti[i].Valutazione > max) { max = Voti[i].Valutazione; massimo = Voti[i]; } } return(massimo); }
public Votazione TrovaVotoMinimo() { double min = 0; Materia minm = new Materia(""); Studente mins = new Studente(" ", " "); Votazione minimo = new Votazione(minm, mins, 0); for (int i = 0; i < Voti.Count; i++) { if (Voti[i].Valutazione > min) { min = Voti[i].Valutazione; minimo = Voti[i]; } } return(minimo); }
public void AssegnaVoto(Studente studente, Valutazione voto) { studente.AddVoto(voto); voti.Add(voto); }
public string NomeCompleto(Studente s) { return($"{s.Cognome}{s.Nome}, nato il {s.DataNascita}"); }
public void AddStudente(Studente studente) { studenti.Add(studente); }
public Votazione(Materia m, Studente studente, double valutazione) { this.Valutazione = valutazione; this.Studente = studente; this.M = m; }
public void AddStudente(Studente Paf) { Studenti.Add(Paf); }
public Votazione(double voto, Studente studente, Materia materia) { this.voto = voto; studente.AddVoto(this); this.materia = materia; }
public Valutazione(double voto, Studente studente, Docente docente) { this.voto = voto; docente.AssegnaVoto(studente, this); }