Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago