Question

Has to be written in C#!

Write a Windows Forms application that calculates and prints the take-home pay for a commissioned sales employee. Allow the user to enter values for the name of the employee and the sales amount for the week. Employees receive 7% of the total sales. Federal tax rate is 18%. Retirement contribution is 15%. Social Security tax rate is 9%. Use appropriate constants. Write Input, Display, and Calculate methods. Your final output should display all calculated values,

including the total deductions and all defined constants.

Net Pay Calculator Employee name: Nicolas Boubaki Employees total weekly sales: -212.14 Calculate Take Home Pay Federal tax (8%) Retirement contrbution (5%) Social Securty (94 Total Net Pay: Form 10 Total weekly sales must be a positive dollar amount. Please re-enter.

0 0
Add a comment Improve this question Transcribed image text
Answer #1


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClassLibrary1;


namespace CalculatetakeHomeSalary
{
public partial class Form1 : Form
{
       int salary=0;
       int basicSal=5000;
public Form1()
{
InitializeComponent();
cal.Enabled = false;
}

private void Ext_Click(object sender, EventArgs e)
{
this.Close();
}
      
       private void tb1_TextChanged(object sender, EventArgs e)
{
  
}
       private void tb2_TextChanged(object sender, EventArgs e)
{

  
  
}
       private void tb3_TextChanged(object sender, EventArgs e)
{

  

}
       private void tb4_TextChanged(object sender, EventArgs e)
{

  
}
       private void tb5_TextChanged(object sender, EventArgs e)
{
  
}
      
       public void Input()
       {
           public string name=tb5.Text;
           if(tb1.Text<0)
           {
               MessageBox.Show("Total weekly sales must be a positive dollar amount, Please re-enter");
           }
           else{
           public double monthlySales=4*0.007*Convert.ToInt64(tb1.Text);
           }
       }
      
       public void Calculate()
       {
           public double fedTax=0.018*basicSal;
           public double retContr=0.015*basicSal;
           public double ssTax=0.009*basicSal;
             
       public double monSal=monthlySales - 0.018*basicSal - 0.015*basicSal - 0.009*basicSal;
       }
      
       public void Display()
       {
           tb2.Text = fedTax.ToString();
           tb3.Text= retContr.ToString();
           tb4.Text= ssTax.ToString();
           label9.Text= monSal.ToString();
       }
      
private void CalculatetakeHome(object sender, EventArgs e)
       {
           Display();
       }
         
       private void Clear(object sender, EventArgs e)
       {
           tb1.Text=string.Empty;
           tb2.Text=string.Empty;
           tb3.Text=string.Empty;
               tb4.Text=string.Empty;
               tb5.Text=string.Empty;
       }


  

}
}

Add a comment
Know the answer?
Add Answer to:
Has to be written in C#! Write a Windows Forms application that calculates and prints the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a C# Windows Forms application that calculates and prints the take-home pay for a commissioned...

    Write a C# Windows Forms application that calculates and prints the take-home pay for a commissioned sales employee. Allow the user to enter values for the name of the employee and the sales amount for the week. Employees receive 7% of the total sales. Federal tax rate is 18%. Retirement contribution is 15%. Social Security tax rate is 9%. Use appropriate constants. Write Input, Display, and Calculate methods. Your final output should display all calculated values, including the total deductions...

  • Write a Java application with a class name of Payroll, for the “Travel Agency”, that willCalculate...

    Write a Java application with a class name of Payroll, for the “Travel Agency”, that willCalculate the weekly paycheck for both Salaried and Hourly employees. Salaried employees will be paid 1/52 of their annual pay minus 18% withheld for federal and state taxes, as well as 4% for retirement pension. Salaried employees do not collect overtime pay. There are two types of Hourly employees; permanent employees and temporary weekly employees. •Permanent weekly employees will be paid their hourly rate minus...

  • please help, In this lab, you complete a C++ program with the provided data files. The program calculates the amount of...

    please help, In this lab, you complete a C++ program with the provided data files. The program calculates the amount of tax withheld from an employee’s weekly salary, the tax deduction to which the employee is entitled for each dependent, and the employee’s take- home pay. The program output includes state tax withheld, federal tax withheld, dependent tax deductions, salary, and take-home pay. Instructions Ensure the source code file named Payroll.cpp is open in the code editor. Variables have been...

  • use at least two functions in your program. . Write a program that calculates weekly payment....

    use at least two functions in your program. . Write a program that calculates weekly payment. The program will ask the user full name, ID number (make one up), and hours worked. An hourly worker’s gross pay is basically his/her work hours that week multiplied by his/her regular hourly pay rate. However, after the first 40 work hours of the week, each additional work hour is paid at an overtime rate that is 1.5 times of the regular hourly rate....

  • You are to write a program that will process employees and their pay. For each employee...

    You are to write a program that will process employees and their pay. For each employee the program will read in an employee’s name and hourly pay rate. It should also read in the number of hours worked each day for 5 days and calculate his or her total number of hours worked. You must read the hours using a loop. The program should output the employee’s name, gross pay, total withholding amount and net pay. Withholding is made up...

  • Problem PR - A (2018) * Peppy Company pays its employees on the 15th and last...

    Problem PR - A (2018) * Peppy Company pays its employees on the 15th and last day of each month. Employees gross pay is subject to these taxes: Applied to First $128,400 ALL Wages First $7,000 First $7,000 Tax FICA - Social Security FICA Medicare Federal Unemployment State Unemployment Rate 6.20% 1.45% 0.80% 4.00% The company is preparing its payroll for the period ending October 31, 2018. Payroll records show the following information for the company's three employees. Current Pay...

  • ment Chapter 116 Help Seve & Exit Check Paloma Co. has four employees. FICA Social Security...

    ment Chapter 116 Help Seve & Exit Check Paloma Co. has four employees. FICA Social Security taxes are 6.2% of the first $128.400 paid to each employee, and FICA Medicare taxes are 1.45% of gross pay. Also, for the first $7,000 paid to each employee the company's FUTA taxes are 0.6% and SUTA taxes are 5.4%. The company is preparing its payroll calculations for the week ended August 25. Payroll records show the following information for the company's four employees...

  • 1. Total net pay, $16.592.58 Excel PR 11-4B Payroll register OBJ. 2,3 The following data for...

    1. Total net pay, $16.592.58 Excel PR 11-4B Payroll register OBJ. 2,3 The following data for Flexco Inc. relate to the payroll for the week ended December, 2016 Hours Hourly Weekly Federal Retirement Employee Worked Rate Salary Income Tax Savings Carlton 52 $50.00 $667.00 $ 60 Grove $4,000 860.00 100 Johnson 36 52.00 355.68 Koufax 58.00 578.55 Maddux 45.00 349.65 Seaver 3,200 768.00 Spahn 52.00 382.20 0 Winn 75 48 50.00 572.00 54.00 43 480.60 0 46 80 Young Employees...

  • PR 11-4B Payroll register OBJ. 2,3 The following data for Flexco Inc. relate to the payroll...

    PR 11-4B Payroll register OBJ. 2,3 The following data for Flexco Inc. relate to the payroll for the week ended December 9, 2048: 1. Total net pay $16,592.58 Hours Worked Hourly Rate $50.00 Weekly Salary Retirement Savings $ 60 100 $4,000 Employee Carlton Grove Johnson Koufax Maddux Seaver Spahn Winn Young 52.00 58.00 45.00 Federal Income Tax $667.00 860.00 355.68 578.55 349.65 768.00 382.20 572.00 480.60 44 3,200 120 0 46 52.00 50.00 54.00 80 Employees Grove and Seaver are...

  • PR 11-4B Payroll register Obj. 2, 3 The following data for Flexco Inc. relate to the...

    PR 11-4B Payroll register Obj. 2, 3 The following data for Flexco Inc. relate to the payroll for the week ended December 9, 2018: Hours Worked 52 Weekly Salary Hourly Rate $50.00 52.00 58.00 45.00 Retirement Savings $ 60 100 $4,000 Employee Carlton Grove Johnson Koufax Maddux Seaver Spahn Winn Young 36 Federal Income Tax $667.00 860.00 355.68 578.55 349.65 768.00 382.20 572,00 480.60 44 62 120 3.200 52.00 50.00 54.00 Employees Grove and Seaver are office staff, and all...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT