Hi everyone,
Could someone please check my answer forthe question below and tell me if it is correct.
Implement a method showTaxAmount to show the tax paid for payment amount from 1000 to 55000 with incremental of 100.
Answer
Thank you all very much.Code:
public void showTaxAmount(int payment)
{
if (payment >= 1000 && payment <= 55000 && (payment%100 == 0) )
{
System.out.println("Tax paid for " + payment + " is "+ payment*TAX_RATE);
}
else
{
System.out.println("Payment should be from 1000 to 55000 with incremental of 100");
}
}

