Question
Conditional Testing using, ifelse: In the state of New Jersey, state income taxes are assessed at 2 percent of income for incomes less than or
Conditional Testing using, ifelse: In the state of New Jersey, state income taxes are assessed at 2 percent of income for incomes less than or equal to $20,000. For incomes greater than $20,000, state taxes are 2.5 percent of the income that exceeds $20,000 plus a fixed amount of $400.
Using this information, write a JAVA program that will prompt the user to enter a floating-point value representing the users annual salary. Based on the above information the program is to calculate the state tax for the user-entered income value. As output, the program will display the users salary and the amount of state income tax for the given salary.
In writing your program, include the following symbolic constants:
final double LIMIT = 20000.00;
final double REG_RATE = 0.02; //represents 2%
final double HIGH_RATE = 0.025; //represents 2.5%
final double FIXED = 400.00;
Step 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