All pastes #2109512 Raw Edit

Something

public text v1 · immutable
#2109512 ·published 2012-02-03 21:41 UTC
rendered paste body
Programming Assignment 2

Assignment Goal:

In this chapter we discussed using variables and performing calculations.  For this assignment, we will calculate the net pay for a basic payroll.

Assignment Specifications:

Write a program called CalculateNetPay.  Create variables to contain the following data and assignment the values indicated below:

•	Employee Name - Assign your name
•	Hourly Rate - 12.50
•	Regular hours - 40.00
•	Overtime hours - 6.25
•	Shift hours - 10.75
•	Weekend hours - 8.5

Declare variables for all input and result fields.  Declare constants for the following fields:

•	Shift Rate - $1.25 per shift hour
•	Weekend Rate - $1.50 per weekend hour
•	Federal Withholding Percentage - 23% of gross pay
•	Social Security Withholding Percentage - 6.2% of gross pay
•	Medicare Withholding Percentage - 1.45% of gross pay
•	State Withholding Percentage - 3.5% of gross pay

Pays are calculated as follows:

Regular Pay = Regular Hours times Hourly Rate
Overtime Pay = Overtime Hours times (Hourly Rate times 1.5)
Shift Pay = Shift Hours times Shift Rate
Weekend Pay = Weekend Hours times Weekend Rate
Gross Pay = Regular Pay + Overtime Pay + Shift Pay + Weekend Pay
Net Pay = Gross Pay - all individual withholding taxes

Taxes are calculated as follows:

	Federal Withholding = Gross Pay * Federal Withholding Percentage
	Social Security Withholding = Gross pay * Social Security Withholding Percentage
	Medicare Withholding = Gross Pay * Medicare Withholding Percentage
	State Withholding = Gross Pay * State Withholding Percentage
Output all variables in a formatted display.  All dollar variables should be formatted as currency.  All hours should be formatted as fixed with two decimal placed.



Deliverables (what you are to submit):

1.	A planning document using pseudocode showing the solution to the problem.
2.	A prototype screen showing the output of your program.  You are to list all input and calculated fields.
3.	A set of test data with expected results.  For this assignment, create another set of data besides the data I provided to test your program.
4.	Your complete project folder in zip format.