Question: C# project: Create a program that will calculate employees monthly gross pay as follows: Inputs: Name Annual Salary Monthly Sales Keeps asking for additional inputs

C# project:

Create a program that will calculate employees monthly gross pay as follows:

Inputs:

Name

Annual Salary

Monthly Sales

Keeps asking for additional inputs and creating the outputs until an empty name is entered.

Outputs:

Name

Monthly Base Pay (Salary / 12)

Commission calculated as follows:

Subtract 10 * Monthly Base Pay from Monthly Sales giving Net Sales

If the Net Sales is <= 0, then the Commission is 0

Otherwise the First $10,000 in Net Sales is commissioned at 5%

The next $15,000 in Net Sales is commissioned at 10%

The next $25,000 in Net Sales is commissioned at 15%

Any Net Sales over $50,000 is commissioned at 20%

Gross Pay (Monthly Base Pay + Commission).

If any of the inputs are unreasonable, tell user with a message and force reentry of the data (e.g. Negative Sales, Annual Salary > $120,000 or < $12,000, if not 0).

Additional Requirements:

Create a class to contain the employee data.

Need class attributes for: name, base pay, sales

Create accessors and mutators for all the data above

Create routine to return gross pay

Create constructor(s)

Create an array of that class.

Create a menu system that allows:

Employees to be added to the employee list

Sales for month to be entered

Report on pay created

Exit the program

You may use global variables for the item 2 array and the number elements in the array in use.

Create static methods to:

Handle menu

Add new employees

Enter sales for month

Produce the pay report.

Submitting a program that does not compile is an automatic 20 point deduction, with additional deductions for the reasons that it does not compile.

Code must use proper naming conventions and be properly indented (up to 10 point deduction for poor indentation, and 10 points for inconsistent naming)

Failure to use named constants for numeric literals will cost up to 5 points.

Points will be deducted if the program does not meet ALL the specifications above.

Example input and Output (user input in Bold):

Enter employee's name (enter nothing to quit): Howard

Enter Annual Salary (0 for pure commission): 30000

Enter Monthly Sales: 40000

Howard Base Salary=$2,500.00 Sales=$40,000.00 Commission=$1,000.00 Gross Pay= $3,500.00

Enter employee's name (enter nothing to quit): Tom

Enter Annual Salary (0 for pure commission): 0

Enter Monthly Sales: 40000

Tom Base Salary= $0.00 Sales=$40,000.00 Commission=$4,250.00 Gross Pay= $4,250.00

Enter employee's name (enter nothing to quit): Sally

Enter Annual Salary (0 for pure commission): 0

Enter Monthly Sales: 60000

Sally Base Salary= $0.00 Sales=$60,000.00 Commission=$7,750.00 Gross Pay= $7,750.00

Enter employee's name (enter nothing to quit): Joe

Enter Annual Salary (0 for pure commission): 30000

Enter Monthly Sales: 20000

Joe Base Salary=$2,500.00 Sales=$20,000.00 Commission= $0.00 Gross Pay= $2,500.00

Enter employee's name (enter nothing to quit):

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!