GuilhermeRamalho

Classe Principal

Aug 21st, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.util.ArrayList;
  3. import javax.swing.JOptionPane;
  4.  
  5. public class Principal
  6. {
  7.     public static void main(String[] args)
  8.     {
  9.         int fim = 0;
  10.  
  11.         do
  12.         {
  13.             ArrayList<Cliente> dados = new ArrayList<Cliente>();
  14.  
  15.             String menu;
  16.             int escolha;
  17.             Scanner scan = new Scanner(System.in);
  18.  
  19.             menu = JOptionPane.showInputDialog("MENU\n\n" +
  20.                     "1 - Adicionar cliente\n" +
  21.                     "2 - Remover cliente\n" +
  22.                     "3 - Pesuisar cliente\n" +
  23.                     "4 - Imprimir quantidade de clientes\n" +
  24.                     "5 - Listar todos os clientes\n" +
  25.                     "0 - Sair\n");
  26.  
  27.             escolha = Integer.parseInt(menu);
  28.  
  29.  
  30.             if(escolha == 1)
  31.             {
  32.                 //Adicionar cliente.
  33.             }
  34.             else if(escolha == 2)
  35.             {
  36.                 //Remover cliente.
  37.             }
  38.             else if(escolha ==3)
  39.             {
  40.                 //Pesquisar cliente.
  41.             }
  42.             else if(escolha == 4)
  43.             {
  44.                 //Imprimir quantidade de clientes.
  45.             }
  46.             else if(escolha == 5)
  47.             {
  48.                 //Pesquisar clientes.
  49.             }
  50.             else if(escolha == 0)
  51.             {
  52.                 fim = 1;
  53.             }
  54.             else
  55.             {
  56.                 System.out.println("Opção inválida!");
  57.             }
  58.  
  59.  
  60.         }
  61.  
  62.         while(fim != 1);
  63.  
  64.     }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment