Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void scegliEsame(Medico m)
- {
- Scanner scan=new Scanner(System.in);
- String nome, data;
- System.out.print("Inserire numero di esami da prenotare: ");
- int ex=scan.nextInt();
- System.out.println();
- scan.nextLine();
- for(int i=0;i<ex;i++)
- {
- System.out.print("Inserire nome esame da voler effettuare: ");
- nome=scan.nextLine();
- if(m.getCosto(nome)==-1)
- {
- System.out.println("Esame non trovato");
- return;
- }
- else
- costo+=m.getCosto(nome);
- System.out.print("Inserire data di prenotazione: ");
- data=scan.nextLine();
- Esame e=new Esame(nome, m, data,costo);
- esami.add(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement