logo Practice-It logo

tax

Language/Type: Java if/else method basics return
Author: Brad Goring

Write a method named tax that accepts a salary as a parameter and that returns the amount of tax you would owe if you make that salary. The tax is based on your tax bracket as found from the first two columns below. Once you know which row to use, start with the "flat amount" and add the "plus %" of the amount over the amount listed in the final column. For example, if your income is $50,000, then you use the third row of the table and compute the tax as $4,000 plus 25% of the amount over $29,050, which comes to $9,237.50. The total tax on $27,500 is $3,767.50. For $6,000, the tax is $600. For $120,000, the tax is $28,227. Assume your method is passed a value >= 0.

over but not over flat amount plus % of excess over
$0 $7,150 $0 10% $0
$7150 $29,050 $715 15% $7,150
$29,050 $70,350 $4000 25% $29,050
$70,350 unlimited $14,325 28% $70,350
Type your solution here:


This is a method problem. Write a Java method as described. Do not write a complete program or class; just the method(s) above.

You must log in before you can solve this problem.


Log In

If you do not understand how to solve a problem or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect problems/tests, etc.), please

Is there a problem? Contact a site administrator.