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

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.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.