Aggiornata classe Main per fare test sul funzionmaneto

This commit is contained in:
Mr SL1D3R 2025-03-04 09:01:18 +01:00
parent 60032f8b3c
commit fce973be70
1 changed files with 20 additions and 8 deletions

View File

@ -2,14 +2,26 @@
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
// to see how IntelliJ IDEA suggests fixing it.
System.out.printf("Hello and welcome!");
Cinema cinema;
cinema = new Cinema("Calvino VIew", 5);
for (int i = 1; i <= 5; i++) {
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
System.out.println("i = " + i);
}
Film film1 = new Film("Il Signore degli Anelli", 180, "Sala 1", 100);
Film film2 = new Film("Harry Potter", 120, "Sala 2", 100);
Film film3 = new Film("Il Padrino", 150, "Sala 3", 100);
cinema.aggiungiFilm(film1);
cinema.aggiungiFilm(film2);
cinema.aggiungiFilm(film3);
cinema.stampaProgrammazione();
cinema.prenotaPosti(10, film1);
cinema.prenotaPosti(10, film1);
cinema.prenotaPosti(10, film1);
cinema.prenotaPosti(10, film1);
cinema.stampaProgrammazione();
cinema.filmPiùLungo();
}
}