public class Factura{ private static int iva1; private static int iva2; private int total; public void setIva1(int iva){ this.iva1=iva; } public void setIva2(int iva){ this.iva2=iva; } public void setTotal(int total){ this.total=total; } public int getIva1(){ return iva1; } public int getIva2(){ return iva2; } public int getTotal(){ return total; } public static void calcularIva(int total, int iva){ System.out.println("el total del iva a pagar es de "+(double)(total)/(double)iva/100); } public static void main(String[] args) { Factura F1=new Factura(); F1.setIva1(10); F1.setIva2(5); F1.setTotal(100000); calcularIva(total, f1.getIva1()); } }