In: Computer Science
In C#,
I have 6 teaching positions. I have to keep my salary expenses below $250,000 and each position carries insurance and tax costs equal to 25% of their salary.
Create an application that allows me to enter the Years of Experience for 6 teacher positions. Based on those years of experience, look up the minimum salary, total the salaries for all 6 positions. Calculate the 25% tax and insurance expense based on the salaries, and display the total of the tax and insurance expenses to the user. Finally display the total salary, tax, and insurance expenses to the user.
If the total is more than $250,000 then allow the user to start over.
Minimum Salary |
Years of Experience |
31600 |
0 |
31975 |
1 |
32350 |
2 |
32725 |
3 |
33100 |
4 |
33500 |
5 |
33900 |
6 |
This project should include a CalculateTotalSalaries method which returns the total. The salaries should be passed to this method as a parameter.
This project should also include a CalculateTaxAndInsurance method which returns the total tax and insurance expenses based on an array of salaries. The array of salaries should be passed to this method as a parameter.
Required Project Code Files are given below.
Form1.cs |
using System; namespace SalaryExpense // method to execute when button calculate is clicked // getting the minimum salaries // calculating the total minimum salaries } // method for tax calculate // method to return minimum salary based on experience // method to calculate and return the total salary // method to validate input, to check whether all the experience
positions are entered or not } else if (tb_position2.Text.Equals("")) } else if (tb_position4.Text.Equals("")) } else if (tb_position5.Text.Equals("")) } else if (tb_position6.Text.Equals("")) // button clear click method tb_total_salary.Text = ""; private void Form1_Load(object sender, EventArgs e)
|
Form1.Designer.cs |
namespace SalaryExpense /// <summary> #region Windows Form Designer generated code /// <summary> } #endregion private System.Windows.Forms.GroupBox grpbox_positions; |
Component Names
Project/Solution Name
OUTPUT