Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Payroll Application: C# Problem Description: An org needs a payroll application which has the capability to calculate and print the monthly pay of an employee.

Payroll Application: C#

Problem Description:

An org needs a payroll application which has the capability to calculate and print the monthly pay of an employee. The application starts by printing a short description of what it does. Then, it asks for the employee name. Next, the application prompts for employee type (H for hourly and S for salaried.) If the user enters S, the gross pay is set to $4000. However, if the user enters H for an hourly employee, the application asks for the number of hours worked and the hourly rate and these are used to calculate the gross pay.

The deductions from the paycheck before tax cuts are contributions to health insurance ($300) and retirement plan (6%). The federal income tax (15%) and state income tax (5%) are deducted after the contributions to health and retirement are deducted from the gross pay. A sample payslip for each kind of employee is shown in the screenshots below. Make sure your applications output is similar or better than the screenshots given below.

Technical Specifications

  • You should explain your code by providing adequate commenting.
  • You will need two class files for this application. One will be called Payroll and the other PayrollTest.
  • The program must ask for the name, and the employee type. The name and employee type should be stored as instance variables with appropriate properties. You will also need another instance variable to store the Gross Pay of the employee. The value for this variable will depend on the type of employee. If the employee is an hourly employee it should ask for the number of hours worked, and the hourly rate for the employee to calculate the gross pay.
  • The program must then process the information and output it as shown in the samples above. All processing of the Net Pay will be done by a method in the Payroll class.
  • All output must be printed by a method in the Payroll class. The output must print:
    • Payslip Header
    • The Gross Pay amount (rounded to two decimal places)
    • The contributions to health and retirement plans and the federal and state tax amounts.
    • And finally, the net pay amount (rounded to two decimal places)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

2 What are the key barriers to implementing HRM?

Answered: 1 week ago

Question

c. Will leaders rotate periodically?

Answered: 1 week ago

Question

b. Will there be one assigned leader?

Answered: 1 week ago