Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It has to be C# Calculate income tax In this exercise, use nested if statements and arithmetic expressions to calculate the federal income tax that
It has to be C#
Calculate income tax In this exercise, use nested if statements and arithmetic expressions to calculate the federal income tax that is owed for a taxable income amount entered by the user. o Income Tax Calculator Entry Error Taxable income: 38650 Invalid numeric format. Please check all entries. Income tax owed: $5,456.25 OK Calculate Exit This is the 2020 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 $0 $9,876 $40,126 $85,526 $163,301 $207,351 $518,400 $9,875 $40,125 $85,125 $163,300 $207,350 $518,400 $0 plus 10% $987.50 plus 12% $4,617.50 plus 22% $14,605.50 plus 24% $33,271.50 plus 32% $47,367.50 plus 35% $156,235 plus 37% $9,875 $40,125 $85,525 $163,300 $207,350 $518,400 10. Add a try-catch statement in the btnCalculate Click event handler that will catch any exceptions that occur when the statements in that event handler are executed. If an exception occurs, display a dialog box with the error message, the type of error, and a stack trace. 11. Add an additional catch blocks to the try-catch statement that will catch a FormatException, this catch block display a dialog box with an appropriate error message. 12. Create an event handler that clears the Income Tax Owed text box if the user changes the value in the Taxable income text box. 10. Add a try-catch statement in the btnCalculate Click event handler that will catch any exceptions that occur when the statements in that event handler are executed. If an exception occurs, display a dialog box with the error message, the type of error, and a stack trace. 11. Add an additional catch blocks to the try-catch statement that will catch a FormatException, this catch block display a dialog box with an appropriate error message. 12. Create an event handler that clears the Income Tax Owed text box if the user changes the value in the Taxable income text boxStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started