Question
C Sharp University needs to you to create a federal income tax table to convert taxable income for the employees to income taxes they will
C Sharp University needs to you to create a federal income tax table to convert taxable income for the employees to income taxes they will owe per calendar year. Youll 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.
This is the 2017 table for the federal income tax on individuals that you should use for calculating the tax:
1. Start Visual Studio.
2. Click the Create Project hyperlink or use the File-New Project menu option.
3. In the New Project dialog box type a name for the project
4. Change the forms File Name property from Form1.vb to a new name Lab5.cs
5. Change the title of the form as shown above.
6. Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. When the user presses the Enter key, the Click event of the Calculate button should fire. When the user presses the Esc key, the Click event of the Exit button should fire.
7. Create an event handler for the Click event of the Exit button that closes the form.
8. Create an event handler for the Click event of the Calculate button. Then, write the code for calculating and displaying the tax owed for any amount within the brackets in the table above. This code should provide for decimal entries, but you can assume that the user will enter valid decimal values.
Create a decimal variable to hold the value entered into the taxable income textbox
Create a decimal variable to hold the tax and initialize it to 0
Create a series of If, Else if statements to text each bracket
Example: if (income 9225 && income
9. Return the value back to the income tax owed textbox.
10. To test this code, use income values of 8700 and 35350, which should display taxable amounts of 870 and 4840.50.
I'm specifically having trouble with the if, else if, and else statements for the percentage but am sending this from my smartphone and cannot upload a copy of the code. Any help is greatly appreciated!
Taxable income Income tax Over... But not over... Of excess over... $0 S9,225 $37,450 $90,750 S189,300 S411,500 S413,200 $9,225 $37,450 $90,750 $189,300 $41 1,500 S4 13,200 $0 plus 10% $922.50 plus 15% $5,156.25 plus 25% $18,481.25 plus 28% $46,075.25 plus 33% $1 19,401.25 plus 35% $119,996,25 plus 39.6% $0 $9,225 37,450 90,750 S189,300 S411,500 S413,200 | |Step 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