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 take-home pay information for a person on a sales plan (i.e. earns commissions on sales). Given that we are in Chapter 2(and theoretically don't even know how to prompt for persons name or sales information), you should make the following assumptions:
1) Use a variable called empName for the employee's name and set the name (compile time) to your name.
2) For this assignment, all monetary fields should be decimal data type.
3) Employees earn 6% of their total sales as commission. The 6% should be declared as a constant and use the correct naming convention for constants.
4) Employees pay a 15% federal tax rate. The federal tax rate should be declared as a constant and use the correct naming convention for constants.
Employees pay a 3.0% state tax rate. This should also be a constant and using correct naming convention for constants.
5) Employees have a mandatory retirement contribution of 5%. This rate should be declared as a constant and use the correct naming convention for constants.
6) Employees pay 7% to social security (yes, I know that is lower than reality). Again, this is a constant (rate).
7) Assume (hard code) that the employee has 100,000.00 in sales.
8) 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 (i.e. a separator), e.g."-----------------------------------"(Note, 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 )
9) 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 (e.g. Employee Name:) left aligned and the value (e.g. "John Thompson") right aligned. All of the values should be aligned (i.e. a column).

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!