What have you done so far to isolate the problem? Have you stepped through the code with the
IDE's debugger? or if you don't have a good IDE, have you put in System.out.println() statements
in the code? Have you debugged one case yet?
A critical aside, not directly related to your problem, but I have to mention it: never use float or double for money. Ever. Use the integer number of pennies. Floating point numbers don't add up the way pennies do. The problems will be subtle and hard to find, but some accountant will find it and jump all over your, er, back.