Question: Task 2 : computeTax ( ) Write a method named computeTax that accepts a salary as a parameter and returns the amount of tax you
Task : computeTax
Write a method named computeTax that accepts a salary as a parameter and returns the amount
of tax you would owe if you made that salary. The tax is based on your tax bracket found in 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 $ then you use the third row of the table and compute the tax as $ plus
of the amount over $ which comes to $ The total tax of $ is
$ For $ the tax is $ For $ the tax is $ If a negative salary is
given, your method should return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
