Design a modular algorithm (flowchart and pseudo-code), code (C#) and test (desk check and test plan) a solution to solve the following problem:
A company wants to see a printout of the gross payroll for each of its 7 departments. The output should be a list of the seven departments and the total gross payroll (rate times hours) for each department. Be sure to validate the input data. If a line of data is invalid print out an error message along with the invalid data, then continue processing with the next record.
The file containing the employee data that will be used for the calculations is structured as follows:
FIELD DESCRIPTION DATA TYPE VALID VALUES
Employee ID Character Non blank
Department Number Numeric 1 - 7
Hourly Salary Numeric at least 10.00
Hours Worked Numeric greater than 0
The fields in each record will be separated by a comma.
For example: EID001, 2, 15.50, 40