Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- public class Main {
- /**
- * @param args
- */
- public static void main(String[] args) throws Exception{
- // TODO Auto-generated method stub
- ArrayList<Abbonamento> Abbmti = new ArrayList<Abbonamento>();
- Scanner input=new Scanner(System.in);
- String name,sex;
- boolean cond=true;
- int old;
- String scelta;
- Abbonamento cliente;
- File abbmti=new File("Lista_Abbonamenti.txt");
- while(cond){
- System.out.println("Inserire un altro utente ? s/n ");
- scelta=input.next();
- if(scelta.equals("n")) {
- cond=false;
- continue;
- }
- System.out.println("Nome del cliente: ");
- name=input.nextLine();
- System.out.println("Sesso del cliente M/F");
- sex=input.next();
- System.out.println("Età :");
- old=input.nextInt();
- cliente=new Abbonamento(name,sex,old);
- Abbmti.add(cliente);
- }
- }
- }
Add Comment
Please, Sign In to add comment