Escolar Documentos
Profissional Documentos
Cultura Documentos
Prova Java
Prova Java
Questo 1)
Principal
import javax.swing.JOptionPane;
float deposito;
String dia;
System.exit(0);
Classe Cliente
float total;
float resultado;
float dia;
float entrada;
if(dia.equalsIgnoreCase("1")){
resultado=(float) ((deposito*0.6043)/100);
if(dia.equalsIgnoreCase("2")){
resultado=(float) ((deposito*0.5932)/100);
return total;
if(dia.equalsIgnoreCase("3")){
resultado=(float) ((deposito*0.5640)/100);
return total;
if(dia.equalsIgnoreCase("4")){
resultado=(float) ((deposito*0.5719)/100);
return total;
if(dia.equalsIgnoreCase("5")){
resultado=(float) ((deposito*0.6021)/100);
return total;
if(dia.equalsIgnoreCase("6")){
resultado=(float) ((deposito*0.6420)/100);
return total;
if(dia.equalsIgnoreCase("7")){
resultado=(float) ((deposito*0.6413)/100);
total = resultado + deposito;
return total;
if(dia.equalsIgnoreCase("8")){
resultado=(float) ((deposito*0.6043)/100);
return total;
if(dia.equalsIgnoreCase("9")){
resultado=(float) ((deposito*0.5876)/100);
return total;
if(dia.equalsIgnoreCase("10")){
resultado=(float) ((deposito*0.5634)/100);
return total;
if(dia.equalsIgnoreCase("11")){
resultado=(float) ((deposito*0.5545)/100);
return total;
if(dia.equalsIgnoreCase("12")){
resultado=(float) ((deposito*0.5828)/100);
return total;
if(dia.equalsIgnoreCase("13")){
resultado=(float) ((deposito*0.6404)/100);
return total;
if(dia.equalsIgnoreCase("14")){
resultado=(float) ((deposito*0.6396)/100);
return total;
if(dia.equalsIgnoreCase("15")){
resultado=(float) ((deposito*0.6421)/100);
return total;
if(dia.equalsIgnoreCase("16")){
resultado=(float) ((deposito*0.6024)/100);
return total;
if(dia.equalsIgnoreCase("17")){
resultado=(float) ((deposito*0.5629)/100);
return total;
if(dia.equalsIgnoreCase("18")){
resultado=(float) ((deposito*0.5672)/100);
return total;
}
if(dia.equalsIgnoreCase("19")){
resultado=(float) ((deposito*0.5971)/100);
return total;
if(dia.equalsIgnoreCase("20")){
resultado=(float) ((deposito*0.6327)/100);
return total;
if(dia.equalsIgnoreCase("21")){
resultado=(float) ((deposito*0.6087)/100);
return total;
if(dia.equalsIgnoreCase("22")){
resultado=(float) ((deposito*0.6072)/100);
return total;
if(dia.equalsIgnoreCase("23")){
resultado=(float) ((deposito*0.5936)/100);
return total;
if(dia.equalsIgnoreCase("24")){
resultado=(float) ((deposito*0.5697)/100);
return total;
}
if(dia.equalsIgnoreCase("25")){
resultado=(float) ((deposito*0.5670)/100);
return total;
if(dia.equalsIgnoreCase("26")){
resultado=(float) ((deposito*0.5970)/100);
return total;
if(dia.equalsIgnoreCase("27")){
resultado=(float) ((deposito*0.6359)/100);
return total;
if(dia.equalsIgnoreCase("28")){
resultado=(float) ((deposito*0.6171)/100);
return total;
return total;
Questo 2)
Principal
c.popular();
c.subtraao();
c.imprimir();
Class cliente
import javax.swing.JOptionPane;
original2+= "\n";
segunda2+="\n";
return 0;
subtrao2+="\n";
}
return 0;
return 0;