{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assign6 - ID Block Programmer:Andrey Artamonov...

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************************************* Main: Declare variables Call Open_File function Call Read_data function loop Process_it function Print_it function Read_data function end loop
Background image of page 1

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

View Full Document Right Arrow Icon
Open_File: Prompt User for Input File name (string) Prompt User for Output File name for Payroll report (string) Prompt User for Output File name for Detailed report (string) Check input file, error if bad file Read_data: 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) Process_it: Gross = Hours * PayRate Ret = (Gross - BenCost) * RetP GrossA = Gross - Ret - BenCost Net = GrossA * TaxP Print_it: Output (payroll file & on-screen)
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.

{[ snackBarMessage ]}