Junilu Lacar wrote:The way you've written the calculateTax() method also suggests these tests:
Is this what you intended the behavior to be? That you would round off the tax in some cases and not for others? Because that's what your code does.
Kevin O'Sullivan wrote:I wanted the total tax to rounded to the nearest decimal place for all cases.
Campbell Ritchie wrote:Put a line in at the beginning of the calculate tax method to print out the total pay at that moment.
You have hit a general problem with having too many fields. (Well, maybe that's what caused it.)
Campbell Ritchie wrote:Yes. You might do well to print the word “tax” too.
It might have been better if I had told him to print the right thing (sorry ). Please print the total earnings at the same point.
Junilu Lacar wrote:You won't change the result by adding a System.out.println() statement. The idea there is to "debug" and see what's going on. . . .