Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.ArrayList;
- import javax.swing.JOptionPane;
- public class Principal
- {
- public static void main(String[] args)
- {
- int fim = 0;
- do
- {
- ArrayList<Cliente> dados = new ArrayList<Cliente>();
- String menu;
- int escolha;
- Scanner scan = new Scanner(System.in);
- menu = JOptionPane.showInputDialog("MENU\n\n" +
- "1 - Adicionar cliente\n" +
- "2 - Remover cliente\n" +
- "3 - Pesuisar cliente\n" +
- "4 - Imprimir quantidade de clientes\n" +
- "5 - Listar todos os clientes\n" +
- "0 - Sair\n");
- escolha = Integer.parseInt(menu);
- if(escolha == 1)
- {
- //Adicionar cliente.
- }
- else if(escolha == 2)
- {
- //Remover cliente.
- }
- else if(escolha ==3)
- {
- //Pesquisar cliente.
- }
- else if(escolha == 4)
- {
- //Imprimir quantidade de clientes.
- }
- else if(escolha == 5)
- {
- //Pesquisar clientes.
- }
- else if(escolha == 0)
- {
- fim = 1;
- }
- else
- {
- System.out.println("Opção inválida!");
- }
- }
- while(fim != 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment