|
-
March 28th, 2011, 09:11 PM
#2
Re: Help needed! Calculating weekly pay with if else
Is the Yearly Income Tax correct? I think there is an issue in the if-else statements. You have 5 ranges, 0-6000, 6000-25000, 25000-75000, and 75000-150000. For one, you need a 150000+ range. But more importantly, a number like 99999999 will fall into the projectedAnnual >= 6000 range. Do you see why?
Also, you don't need to use Double. It's better to use double. Double is an object containing the primitive type 'double'. In addition, you have several places where you have something like (75000-25000). Why not put in 50000? It will make the code easier to read.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|