Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, youll use nested if statements and arithmetic expressions to calculate the income tax that is owed for a taxable income amount. To

In this assignment, youll use nested if statements and arithmetic expressions to calculate the income tax that is owed for a taxable income amount. To do that, youll use a prompt statement that displays a dialog box like this to get the value of a users taxable income:

Then, youll calculate the amount of tax thats owed and use an alert statement to display that amount like this:

The following is the 2017 table for the federal income tax on individuals that you should use for calculating the tax:

Taxable Income

Income tax

$0 <= Taxable Income <$9,325

$0 plus 10% of excess over $0

$9,325 <= Taxable Income < $37,950

$932.5 plus 15% of excess over $9,325

$37,950 <= Taxable Income < $91,900

$5,226.25 plus 25% of excess over $37,950

$91,900 <= Taxable Income < $191,650

$18,713.75 plus 28% of excess over $91,900

$191,650 <= Taxable Income < $416,700

$46,643.75 plus 33% of excess over $191,650

$416,700 <= Taxable Income < $418,400

$120,910.25 plus 35% of excess over $416,700

Taxable Income >= $418,400

$121,505.25 plus 39.6% of excess over $418,400

e.g.) If your taxable income is $10,000, then your income tax is $932.5 + ($10,000 - $9,325)*0.15 = $1,033.75.

Open tax_owed.html file that has some JavaScript codes including a do-while loop and a prompt statement for getting the users entry while the entry amount is not 99999.

Write JavaScript codes for calculating the tax owed for any amount.

Add JavaScript codes for data validation that shows a warning alert window when the data entered is a negative number or not a number. The warning message is Please enter a valid positive number or type 99999 to end."

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 Theory Icdt 99 7th International Conference Jerusalem Israel January 10 12 1999 Proceedings Lncs 1540

Authors: Catriel Beeri ,Peter Buneman

1st Edition

3540654526, 978-3540654520

More Books

Students also viewed these Databases questions

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago