Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public string NomeCompleto(Studente s)
 {
     return($"{s.Cognome}{s.Nome}, nato il {s.DataNascita}");
 }
Exemple #4
0
 public void AssegnaVoto(Studente s, Votazione v)
 {
     s.AddVoto(v);
     voti.Add(v);
 }
Exemple #5
0
 public Votazione(Materia m, Studente studente, double valutazione)
 {
     this.Valutazione = valutazione;
     this.Studente    = studente;
     this.M           = m;
 }
Exemple #6
0
 public void AddStudente(Studente s)
 {
     studenti.Add(s);
 }