program8 - and western regions. Output: Your report must...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 110A Program 8 Completion Date: ________ Rule \handouts\pgm8 Using the modular approach, write a program that will produce a year- end salary increase report. Data: Input the employee data from the disk file that was created by your seventh programming exercise. Recall that each employee record consists of four data fields: first name, last name, previous annual salary, and region code. Rather than hardcode the external file name in the call to open(), input the file name from the keyboard. Processing: The employer has decided to give each employee a year-end annual salary increase. For each employee, you must compute the salary increase and new annual salary. The rate of increase is as follows: Eastern Region Western Region old salary less than 100000: 5% 4% otherwise: 3% 2% For the footer lines, you must count the number of employees in the two regions and the number of employees having an invalid region code. You must also compute the average salary increase for both the eastern
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and western regions. Output: Your report must have the format that is given in the print chart that is handed out in class. Use left justification for the string output and right justification for the numeric output. In the detail lines, the region column should be Eastern or Western. For the detail line of an employee having an invalid region code, output the name, old annual salary, and Invalid in the region column, leaving the salary increase and new salary columns blank. General Requirements: 1. Include header comments that give the following information: source file name; your last name, your first name; 110A-your section number; and Task of program 2. Use good programming style; that is, vertically align the matching braces, indent blocks of statements, and use whitespace judiciously....
View Full Document

This note was uploaded on 04/01/2009 for the course CS CS 110A taught by Professor R. during the Spring '08 term at City College of San Francisco.

Ask a homework question - tutors are online