Question: You are asked to write a program that calculates and prints take - home pay information for a person on a sales plan ( i
You are asked to write a program that calculates and prints takehome pay information for a person on a sales plan ie earns commissions on sales Given that we are in Chapter and theoretically don't even know how to prompt for persons name or sales information you should make the following assumptions:
Use a variable called empName for the employee's name and set the name compile time to your name.
For this assignment, all monetary fields should be decimal data type.
Employees earn of their total sales as commission. The should be declared as a constant and use the correct naming convention for constants.
Employees pay a federal tax rate. The federal tax rate should be declared as a constant and use the correct naming convention for constants.
Employees pay a state tax rate. This should also be a constant and using correct naming convention for constants.
Employees have a mandatory retirement contribution of This rate should be declared as a constant and use the correct naming convention for constants.
Employees pay to social security yes I know that is lower than reality Again, this is a constant rate
Assume hard code that the employee has in sales.
Produce output that shows the following in this order:
a Employee Name
b Sales
c Gross pay Computation: sales commission rate
d Federal Taxes Computation: Gross Pay Federal Tax Rate
e State Taxes Computation: Gross Pay State Tax Rate
f Social Security Taxes Computation: Gross Pay Social Security rate
g Retirement Contribution Gross Pay Retirement Rate
h A series of dashs ie a separator egNote please see alignment discussion below
i The total of the deductions Computation: Items d e f g
j Net take home pay Computation: Gross pay minus the summary produced in i
Formatting: The final take home pay and total sales figure should be formatted with currency. All other values should not have $ signs. All values should have thousands separators. The output should show the descriptive text eg Employee Name: left aligned and the value eg "John Thompson" right aligned. All of the values should be aligned ie a column
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
