Factura.java 830 Bytes
Newer Older
willgonzz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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());

    }
}