Assign5Formatting

Assign5Formatting - /* ID Block Programmer :Andrey...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
/* ID Block Programmer :Andrey Artamonov Course :CSCI101 Assignment :Assignment 5 Due Date :14 October 2009 Program Statement This program will take a data file, read and process it, and generate a tablular report and a detailed report outputed to the desired files. *************************Analysis************************** ****************** 1. Data needed Input file name Output file names 2. Constants Given Hourly Pay Rates Benefits Costs Tax Rates 3. Calculations Assumptions: hours worked > 40 and >= to 50 are 1.5 time, and any hours over 50 to 60 are paid 2 time, only workers with skill level 2, 3, or 4 can get benefits, only skill level 4 can participate in retirement program and get up to 5% of gross pay matched in fund. All contributions and deductions are before tax. Calculate Gross Pay Calculate Benefits Deductions Calculate Retirement Fund Contribution (if applicable) Calculate Tax Amount Owed Calculate Net Salary 4. Print Results and send to output files Employee Name Benefits cost Tax amount owed Gross Salary Net Salary Retirement contribution *****************************Algorithm********************* **************** Step 1: Input Prompt User for Input File name (string)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Prompt User for Output File name for Payroll report (string) Prompt User for Output File name for Detailed report (string) Input Skill Level (int) Input User Benefits Code # (int) Input Retirement Plan Contribution (int) Input Hours Worked (int) Input Tax ID (long) Input Employee Name (string) Step 2: Process Gross = Hours * PayRate Ret = (Gross - BenCost) * RetP GrossA = Gross - Ret - BenCost Net = GrossA * TaxP Step 3: Output (payroll file) Name Gross Salary Benefits Contributions Taxes Net Sal Total Gross Salaries Total Benefits collected Total Contributions to Retirement Funds Total Taxes Collected Total Net Salaries Paid Output (Detailed file) Print Full Name on line 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/01/2009 for the course CS 101 at USC.

Page1 / 7

Assign5Formatting - /* ID Block Programmer :Andrey...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online