0

I am having trouble calculating the discount rate in java, I have the formula and equation but cannot figure out, what the problem. and my program would compile and work but would display the wrong amt of discount.

here the a part of the program..

```
public void setDiscountRate(double discountRateBeforeTaxes)
{
totalInvoiceAmount -= discountRate += discountRateBeforeTaxes * 0.20; ;
totalPurchase++;
}
public void setInvoiceAmount(double invoiceAmountBeforeTaxes)
{
totalInvoiceAmount += invoiceAmountBeforeTaxes * 1.0775; /
totalPurchase++;
}
```

Thanks for help in advance