Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Develop a C# console application for Visual C# 2010 that will determine the gros

ID: 3543115 • Letter: D

Question

Develop a C# console application for Visual C# 2010 that will determine the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40 hours. You are given a list of the three employees of the company, the number of hours each employee worked last week, and the hourly rate of each employee. Your application should input this information for each employee and should determine and display the employee

Explanation / Answer

Put in a lot of effort for this one, hope I am rewarded :)using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication5 { class Program { static void Main(string[] args) { string empName; string userInput; double netPay; double editedTax1; double grossPay; double editedTax2; double hrsWorked; double ovtWorked; double payRate; const double FED_TAX = .28; const double SS_TAX = 7.65; // step 1 Console.WriteLine(" WEEKLY PAYROLL INFORMATION"); // step 2 Console.WriteLine(" --------------------------"); // step 3 Console.Write(" Please enter the employer's name: "); empName = Console.ReadLine(); //step 4 Console.Write(" Please enter the number of hours worked this week: "); userInput = Console.ReadLine(); hrsWorked = Convert.ToDouble(userInput); // step 5 Console.Write(" Please enter the number of OVERTIME HOURS worked this week: "); userInput = Console.ReadLine(); ovtWorked = Convert.ToInt32(userInput); // step 6 Console.Write(" Please enter employee's HOURLY PAY RATE: "); userInput = Console.ReadLine(); payRate = Convert.ToDouble(userInput); // step 7 grossPay = (hrsWorked * payRate + ovtWorked * 1.5 * payRate); // step 8 editedTax1 = FED_TAX * grossPay; // step 9 editedTax2 = SS_TAX * grossPay; // step 10 netPay = editedTax1 + editedTax2 - grossPay; // step 11 Console.WriteLine(" The weekly payroll information summary for: " + empName); Console.WriteLine(" Gross pay: {0:C2} ", grossPay); // step 12 Console.WriteLine(" Federal income taxes witheld: {0:C2} ", editedTax1); Console.WriteLine(" Social Security taxes witheld: {0:C2} ", editedTax2); Console.WriteLine(" Net Pay: {0:C2}", netPay); } } }