static void Main(string[] args) { Scuola scuola = new Scuola("RosselliRasetti"); Classe c = scuola.CreaClasse(4, "AI"); Studente s1 = new Studente("Alessio", "Manieri"); Studente s2 = new Studente("Filippo", "Pepe"); Materia m1 = scuola.CreaMateria("Informatica"); Materia m2 = scuola.CreaMateria("Italiano"); Materia m3 = scuola.CreaMateria("Matematica"); Materia m4 = scuola.CreaMateria("Religione"); Votazione v1 = new Votazione(m1, s1, 8); Votazione v2 = new Votazione(m3, s1, 9); Votazione v3 = new Votazione(m2, s1, 6); Votazione v4 = new Votazione(m4, s1, 3); s1.AddVoto(v1); s1.AddVoto(v3); s2.AddVoto(v2); s2.AddVoto(v4); c.AddStudente(s1); c.AddStudente(s1); Console.WriteLine(s1.TrovaVotoMassimo()); }
static void Main(string[] args) { Scuola scuola = new Scuola("Rosselli-Rasetti"); Materia materia = scuola.CreateMateria("Religione"); Classe classe = scuola.CreateClasse(4, "AI"); Studente s = new Studente("alex", "buratta"); Votazione max = scuola.TrovaVotoMassimo(); Votazione min = scuola.TrovaVotoMinimo(); classe.AddStudenti(s); Console.Write($"il voto massimo è{max.voto} Data:{max.data} materia:{max.Materia.nome}"); Console.Write($"il voto minimo è{min.voto} Data:{min.data} materia:{min.Materia.nome}"); }
static void Main(string[] args) { Scuola scuola = new Scuola("Rosselli_Rasetti"); Classe classe = scuola.CreateClasse(4, "AI"); Studente studente1 = new Studente("miao", "bau"); Studente studente2 = new Studente("pino", "frontani"); classe.AddStudente(studente1); classe.AddStudente(studente2); Materia materia1 = new Materia("REligione"); Votazione voto1 = new Votazione(8, studente1, materia1); Votazione voto2 = new Votazione(7, studente2, materia1); Votazione votomax = scuola.TrovaVotoMassimo(); Console.WriteLine($"Il voto massimo della scuola {scuola.GetNome()} è {votomax.GetVotoDouble()}."); }
static void Main(string[] args) { Scuola scuola = new Scuola("Rosselli_Rasetti"); Classe classe = scuola.CreaClasse("AI", 4); Studente studente1 = new Studente("Nicola", "Galeotti"); Studente studente2 = new Studente("Narcis", "Buzatu"); classe.AddStudente(studente1); classe.AddStudente(studente2); Materia materia1 = new Materia("Matematica"); Votazione voto1 = new Votazione(8, studente1, materia1); Votazione voto2 = new Votazione(7, studente2, materia1); Votazione votomax = scuola.TrovaVotoMassimo(); Console.WriteLine($"Il voto massimo della scuola {scuola.Nome} è {votomax.GetVotoDouble()}."); }
public ActionResult SaveNewVotazione(Votazione vForm) { List <Votazione> v = new List <Votazione>(); if (Session["Votazioni"] != null) { v = (Session["Votazioni"] as List <Votazione>); } v.Add(vForm); Session["Votazioni"] = v; if (Request.Form["Salva2"] != null) { return(RedirectToAction("NewVotazione")); } else { return(Redirect("~")); } }
public ActionResult NewVotazione() { Votazione v = new Votazione(); return(View(v)); }