This preview shows pages 1–2. Sign up to view the full content.
Fall 2007 Introduction to C  Program 5
Payroll – W2 Forms
Assigned: 11/9/07
Due: 11/30/07, 3am NO LATE PROGRAM
Objectives
1.
To give students practice in using structures.
2.
To give practice in using functional requirements to identify key functions of
program
3.
To practice using problem description and key functions to create a workflow
graph of program solution
4.
To practice using workflow graph as a program design tool to identify global
variables needed, function prototypes and
details of function implementation.
The Problem: Payroll – W2 Forms
Companies have to issue W2 forms for all of their employees for tax purposes. In this
program, you will write a program that assists a company in creating W2 forms.
Many companies have a system where employees clock in and clock out to determine
how much time they work each week. Since these records are already automatically
stored in files on companies' computers, it only makes sense to use these files to help
calculate how much each employee should get paid. (Once this is calculated, then tax
information for the W2 form can also be calculated.) In order to determine how much an
employee gets paid each week, you need to know the following two pieces of
information:
1) The number of hours they worked in a week
2) Their hourly pay rate
If an employee works 40 or less hours a week, then they simply get paid the number of
hours they worked times their hourly pay rate. If an employee works more than 40 hours,
then they get paid an extra 50% of their regular pay for the hours over 40 they worked.
(For example, if an employee's pay rate is $10/hour and the employee works 50 hours,
then he/she would get paid $550, because he/she gets $10x40 = 400 normally, plus an
extra 1.5x(10 hr)x($10/hr) = $150 for his/her last ten hours of work.
Following this calculation, you will also have to calculate the amount of money withheld
for taxes. Here is the rule that will be used to calculate how much money is withheld for
taxes each week:
1) 10% of regular pay (pay for the first 40 hours) will be withheld for taxes.
2) 20% of overtime pay (pay for any time beyond 40 hours) will be withheld for taxes.
For example, if an employee's pay rate is $10/hour and the employee works 50 hours,
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/11/2008 for the course COP 3223 taught by Professor Guha during the Spring '08 term at University of Central Florida.
 Spring '08
 Guha

Click to edit the document details