Create a C# Windows Form program that uses a one-dimensional array to solve the following problem : A company pays its salesperson on a commission basis. The salesperson receive $200 per week plus a 9% of their gross sales for that week. For example, a salesperson who grosses $5,000 on sales in a week receives $200 plus  9% of the $5,000, or total of $650. Write the program (using  an array of counter) that determines how many of the salespeople  earned salaries in each of the following ranges ( assume that each salesperson’s salary is interger.) Summarize the results in tabular format. It should show the current table of salespersons with salaries in all of the ranges in a Listbox as the user enters them. The user should enter the salespersons gross sales using a textbox and a button. The buttons click event should take the gross sales amount and find which place in the array should have 1 added to it as each is entered, and then redisplay the table a) $200-299 b) $300-399 c) $400-499 d) $500-599 e) $600-699 f) $700-799 g) $800-899 h) $900-999 i) $1,000 and over

The task requires creating a C# Windows Form program that uses a one-dimensional array to calculate and display the number of salespeople who earn salaries within different salary ranges. The program should allow the user to enter the salesperson’s gross sales using a textbox and a button, and then display the current table of salespeople with salaries in each of the specified ranges.

To accomplish this task, we can follow the steps outlined below:

1. Create a Windows Form application in C# using Visual Studio or any other preferred development environment.
2. Design the user interface with a textbox to input the salesperson’s gross sales, a button to trigger the calculation, and a Listbox to display the table of salaries in different ranges.
3. Declare an integer array of size 9 to track the number of salespeople in each salary range. Each element in the array will correspond to a specific salary range.
4. Create a event handler method for the button’s click event. In this method, retrieve the gross sales entered by the user from the textbox.
5. Calculate the commission by multiplying the gross sales by 0.09 (9%) and adding 200.
6. Determine the salary range that the commission falls within by using conditional statements or switch case statements. Increment the corresponding element in the array by 1.
7. Clear the Listbox and populate it with the updated table data by iterating over the array and formatting the data according to the specified salary ranges.
8. Update the display of the Listbox to show the current table of salespeople with salaries in different ranges.

Here is an example of how the program code might look:

private int[] salaryRanges = new int[9];

private void btnCalculate_Click(object sender, EventArgs e)
int grossSales = Int32.Parse(txtGrossSales.Text);
int commission = (int)(grossSales * 0.09) + 200;

if (commission >= 200 && commission < 300) salaryRanges[0]++; else if (commission >= 300 && commission < 400) salaryRanges[1]++; else if (commission >= 400 && commission < 500) salaryRanges[2]++; else if (commission >= 500 && commission < 600) salaryRanges[3]++; else if (commission >= 600 && commission < 700) salaryRanges[4]++; else if (commission >= 700 && commission < 800) salaryRanges[5]++; else if (commission >= 800 && commission < 900) salaryRanges[6]++; else if (commission >= 900 && commission < 1000) salaryRanges[7]++; else if (commission >= 1000)


lstSalaryTable.Items.Add(“$200-299: ” + salaryRanges[0]);
lstSalaryTable.Items.Add(“$300-399: ” + salaryRanges[1]);
lstSalaryTable.Items.Add(“$400-499: ” + salaryRanges[2]);
lstSalaryTable.Items.Add(“$500-599: ” + salaryRanges[3]);
lstSalaryTable.Items.Add(“$600-699: ” + salaryRanges[4]);
lstSalaryTable.Items.Add(“$700-799: ” + salaryRanges[5]);
lstSalaryTable.Items.Add(“$800-899: ” + salaryRanges[6]);
lstSalaryTable.Items.Add(“$900-999: ” + salaryRanges[7]);
lstSalaryTable.Items.Add(“$1,000 and over: ” + salaryRanges[8]);

This code snippet shows an example of how to implement the logic to calculate and update the salary table based on the salesperson’s gross sales. It assumes that the textbox for gross sales is named “txtGrossSales” and the Listbox for displaying the table is named “lstSalaryTable”.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.

Click Here to Make an Order Click Here to Hire a Writer