Advertisement
hercioneto

Exercicio 16-11 Main

Nov 16th, 2023 (edited)
891
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.87 KB | None | 0 0
  1.  public static void main(String[] args) {
  2.         Scanner l = new Scanner(System.in);
  3.         Cliente c = new Cliente();
  4.        
  5.         String sair = "";
  6.         while (!"FIM".equals(sair)) {
  7.         System.out.println("Digite o nome: ");    
  8.         c.setNome(l.next());
  9.         System.out.println("Digite o telefone: ");    
  10.         c.setTelefone(l.next());
  11.         System.out.println("Digite o valor: ");    
  12.         c.setValor(l.nextFloat());
  13.         System.out.println("Digite a opção 'D' para Desconto ou 'J' para Juros: ");    
  14.         c.setOpcao(l.next());
  15.         System.out.println("Digite o valor a Calcular: ");    
  16.         c.setValorCalcular(l.nextFloat());
  17.         c.setValorFinal();
  18.         c.imprime();
  19.             System.out.println("Digite FIM PARA SAIR OU TECLE ENTER PARA CONTINUAR");
  20.             sair = l.next();
  21.         }
  22.        
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement