Question Details

"use strict"; var $ = function (id) { return document.getElementById(id); }; window.onload = function () {...


Answer download
More Details:

 Develop the Income Tax Calculator


In this exercise, you’ll use nested if statements and arithmetic expressions to calculate the income tax that is owed for a taxable income amount. When a user enters his taxable income and clicks the Calculate button, this application will display the federal income tax owed.


This is the 2015 table for the federal income tax on individuals that you should use for calculating the tax:

Taxable income

Income tax

Over…

But not over…

 

Of excess over…

$0

$9,225

$0 plus 10%

$0

$9,225

$37,450

$922.50 plus 15%

$9,225

$37,450

$90,750

$5,156.25 plus 25%

$37,450

$90,750

$189,300

$18,481.25 plus 28%

$90,750

$189,300

$411,500

$46,075.25 plus 33%

$189,300

$411,500

$413,200

$119,401.25 plus 35%

$411,500

$413,200

 

$119,996,25 plus 39.6%

$413,200

  1. Open the HTML and JavaScript files in this folder:

exercises_extrach04income_tax

Note that the JavaScript file has some starting JavaScript code for this application, including the $ function and an onload event handler that attaches a function named processEntry to the click event of the Calculate button.

  1. Code the processEntry function. It should get the user’s entry and make sure it’s a valid number. If it isn’t, it should display an error message. If it is valid, it should pass the value to a function named calculateTax, which should return the tax amount. That amount should then be displayed in the second text box.
  2. Code the calculateTax function, but to start just write the code for calculating the the tax for any amount within the first two brackets in the table above. The tax should be rounded to two decimal places, and it should be returned to the calling function. To test this, use income values of 9225 and 37450, which should display taxable amounts of 922.50 and 5156.25.
  3. Add the JavaScript code for the next tax bracket. Then, if you have the time, add the JavaScript code for the remaining tax brackets.



"use strict";

 

var $ = function (id) {

 

return document.getElementById(id);

 

}; window.onload = function () {

 

$("calculate").onclick = processEntry;

 

};

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Dec 18, 2020

PRICE: $18.50

Solution~00031148234011.zip (25.37 KB)

Buy this answer for only: $18.50

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Dec 18, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.

Order Now