Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java Choose the line of code that has the logic error: Simple linear income tax calculator based on preset rates and threshold levels. Gauthor Hyrum
java
Choose the line of code that has the logic error: Simple linear income tax calculator based on preset rates and threshold levels. Gauthor Hyrum D. Carroll * @version 0.1 (September 3, 2019) public class TaxCalculator private double tax; Vannual income in dollars Line 2 private final double LEVEL 1 INCOME = 10 000.00; Line 4 private final double LEVEL 2 INCOME = 50 000.00; H Line 5 private final double LEVEL 3 INCOME = 100 000.00; Line 6 17% of income private final double TAX RATE_1 = 0.10; private final double TAX RATE 2 = 0.15; private final double TAX RATE 3 = 0.20; private final double TAX RATE 4 = 0.30; 1 Line 9 Line 10 H Line 11 Line 12 * Calculates the amount of taxes due Line 14 Line 15 Line 16 Calculations are as follows: income * 10% if income is less than $10,000 income * 15% if income is less than $50, 000 * income * 20% if income 13 less than $100,000 income + 30% otherwise * @param income The amount of income in dollars * @return the amount of taxes due: * public double getTax double income ) { af incomeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started