Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment: Event-Driven programming

Learning Objectives:

This assignment is designed to practice:

1. Implement JavaScript code which will handle user events.
2. Display feedback to the user in case of data entry errors.
3. Use of the conditional if and if/else statements.
4. Use of arithmetic and logic operators.
5. Use of comments.

Tax Return processing program

Requirements:

The company that needed the flowchart and pseudocode for calculating the Tax Owed amount for tax returns is now giving you the responsibility of creating a program for that purpose.

The requirements for performing the calculation remain the same as those indicated for the flowchart:

For citizens younger than 21, the tax applied is one of the following:

8% for income up to $20,000.
12% for income greater than $20,000 up to $50,000.
20% for income greater than $50,000.

For citizens 21 years old or older, the tax applied is one of the following:

10% for income up to $20,000.
15% for income greater than $20,000 up to $35,000.
25% for income greater than $35,000 up to $70,000.
30% for income greater than $70,000.

- The formula to calculate the Tax Owed amount is: tax rate percentage x income

The company has also provided a video - attached to these instructions on Sakai - that displays the way the program should work as well as the screen format when the program is run. (Note: on the video the program is run three times with different data entries).

Additional Requirements:

- You will enter a comment on the head section with your name on it.
- You will use radio buttons to acquire the age range of the user.
- You will use a text box to get the user's income data.
- You will use a Process button to process the Tax Owed amount.
- The button mentioned above should also:

* Produce an error message (via an alert window) if the user forgets to select a radio button.
* Produce an error message (via an alert window) if the user forgets to enter income data or enters data that cannot be processed such as text data.

- You will use text box to display the tax owed amount.

- You will use a Clear button to reset the main variables as well as the radio buttons and text boxes in order to be able to process the next user's information.

- The variable names should be descriptive. For example, if a program is calculating the tip given at a restaurant, an appropriate variable name may be tipAmount.

- The format of the screen should be similar to that provided on the video example.

Additional Information:

- Since the content of a text box - which is what the prompt() function generates - is going to be used in mathematical operations, use the function parseInt() to ensure that the numeric input is treated as numeric data.

Syntax example:

numericVariable = parseInt(numericVariable)

- Resetting dark circle of a radio button: use the checked property.

- Evaluating if there is no numeric value on a text box: use the isNaN function.

References:

- Recitation sessions
- Lectures
- Fluency textbook Chapters 17, 18
- w3schools website.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92748571

Have any Question?


Related Questions in Computer Engineering

Question 1 in each of the following scenarios there is a

Question: 1. In each of the following scenarios there is a relationship to work life in the IT industry. With each of the following question, ensure that your answer includes the explanation of how it would be applied to ...

We might consider a regression of the number of group

We might consider a regression of the number of group members and the efficiency of project completion. Which of those would be the dependent and which would be the independent variables?

A very skilled court stenographer makes two typographical

A very skilled court stenographer makes two typographical errors (typo) per hour, on average. 1. What probability distribution is most appropriate for calculating the probability of a given number of typos being made by ...

Assignment 1 project proposalyou have been selected to be

Assignment 1: Project Proposal You have been selected to be the project manager (for a project of your choice). The project that you decide to use should meet all the key criteria of a project as outlined in the PMBOK, s ...

Subject is foundations of information technologyresearching

Subject is Foundations of Information Technology. Researching Web 2.0 Write a 5- to 7-page APA formatted research paper on any of the following topics. Research any associated tools, new developments, and benefits/disadv ...

Write a python 3 program please show all outputlambda and

Write a Python 3 Program please show all output. lambda and keyword Magic Goals A bit of lambda functions as objects keyword evaluation Task Write a function that returns a list of n functions, such that each one, when c ...

Meannbsp3290 milesstandard deviation ofnbsp384 mileswhat is

Mean 3290 miles Standard Deviation of 384 miles What is the probability that the mean of a sample of 33 cars would be less than 3160 miles?

Calculate the probability of selecting a random sample of

Calculate the probability of selecting a random sample of 225 observations with a sample proportion of 0.54 or greater, if the sample population has a population proportion of 0.50.

What does the super keyword represents and where can it be

What does the super keyword represents and where can it be used? Give an example of a superclass and subclass. Be sure to make all the instances variables of the super class private. Include at least one constructor in e ...

A compute the sumnbsps1nbsp 1 2 3 nbsp nbsp 9999 the sum

(a) Compute the sum S1 = 1 + 2 + 3 + . . . + 9999 (the sum of all integers from 1 to 9999). Do not use a program. (b) Compute the sum S2 = 1+3+5+...+9999 (the sum of all odd integers from 1 to 9999). Do not use a program ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As