-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCodaDiEventi.java
More file actions
38 lines (35 loc) · 916 Bytes
/
TestCodaDiEventi.java
File metadata and controls
38 lines (35 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package prg.esamiPassati.es6;
import java.util.Scanner;
public class TestCodaDiEventi{
public static void main(String[] args){
CodaDiEventi queue = new CodaDiEventi();
Scanner input = new Scanner(System.in);
int choice;
do{
System.out.println("MENU'");
System.out.println("1. Nuovo evento");
System.out.println("2. Completa evento");
System.out.println("3. Stampa coda");
System.out.println("4. Termina programma\n");
System.out.print("Scelta: ");
choice = input.nextInt();
switch(choice){
case 1:
queue.addEvento();
break;
case 2:
queue.estraiEvento();
break;
case 3:
System.out.println(queue.toString());
break;
case 4:
break;
default:
System.out.println("Scelta non valida. Riprova.");
break;
}
}while(choice != 4);
System.out.println("PROGRAMMA TERMINATO");
}
}