89 lines
2.2 KiB
Java
89 lines
2.2 KiB
Java
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
|
|
*/
|
|
package listaspesa;
|
|
|
|
import java.util.InputMismatchException;
|
|
import java.util.Scanner;
|
|
|
|
/**
|
|
*
|
|
* @author Verde
|
|
*/
|
|
public class listaSpesa {
|
|
|
|
/**
|
|
* @param args the command line arguments
|
|
*/
|
|
|
|
static Scanner sc = new Scanner(System.in);
|
|
Prodotto magazzino[];
|
|
Prodotto scontrino[];
|
|
|
|
public static void main(String[] args) {
|
|
int scelta = -1;
|
|
|
|
do {
|
|
System.out.println("Scegliere un'opzione:");
|
|
System.out.println("1. Modifica inventario");
|
|
System.out.println("2. Inserimento scontrino");
|
|
System.out.println("3. Stampa scontrino");
|
|
System.out.println("4. Rimuovi prodotti scaduti");
|
|
System.out.println("0. Esci");
|
|
System.out.print("Opzione: ");
|
|
|
|
try {
|
|
scelta = sc.nextInt();
|
|
sc.nextLine();
|
|
|
|
switch (scelta) {
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
|
|
pausa();
|
|
break;
|
|
case 2:
|
|
|
|
pausa();
|
|
break;
|
|
case 3:
|
|
|
|
pausa();
|
|
break;
|
|
default:
|
|
System.out.println("Opzione non valida.");
|
|
pausa();
|
|
break;
|
|
}
|
|
}
|
|
catch (InputMismatchException e) {
|
|
System.out.println("Errore: scelta non valida.");
|
|
pausa();
|
|
}
|
|
} while (scelta != 0);
|
|
}
|
|
|
|
public static void pausa() {
|
|
System.out.println("Premere un tasto per continuare. . .");
|
|
sc.nextLine();
|
|
}
|
|
|
|
public static void inserisciProdotto(){
|
|
|
|
}
|
|
|
|
public static void inserisciDatiScontrino(){
|
|
|
|
}
|
|
|
|
public static void stampaScontrino(){
|
|
|
|
}
|
|
|
|
public static boolean ricercaProdotto(String nome, boolean isAlimentare){
|
|
|
|
}
|
|
}
|