Project "pay5": Payroll Program, with input from file into arrays

DESCRIPTION:
Process the weekly payroll for each employee of a company.
For each employee, compute weekly pay amount and create a paycheck and a paystub. Also produce reports, as specified below.

For this revision ("pay5"), the input data will be read from a file and stored into arrays. Employee data can then be looked up by ID and fetched into the Textboxes, and used to compute pay information (check and stub) for the employee. Reports may be printed at any time. See Specifications for "pay1" and "pay2" for further details. (Also see "pay4".

NEW BUTTONS:    Add the following new buttons:

INPUT FROM FILE and ARRAYS:
For each employee, the following information is stored into corresponding array elements from one line of a file, using CSV (Comma Separated Values), when the "READ-FILE" button is clicked, and then fetched from arrays and stored into Textboxes when the "LOOKUP" button is clicked. When the "LOOKUP" button is clicked, these values should be fetched from the array elements, and displayed as strings in the appropriate TextBoxes. (If there is no such ID, then an error message should be displayed.

In addition to the textboxes for the above, there is also a textbox for the hours worked, which must be filled in by the user (before clicking the "PAY" button).


The remaining specifications are the same as those for "pay1" and "pay2", as reproduced below (for your convenience).

OTHER BUTTONS:(Same as "pay1" & "pay2")
PAYCHECK:
		Whatever National Bank

	Pay to the order of John Doe
			the amount of $ 319.50 

OUTPUT:
When pay is computed for each employee, the program shall display a simulated paycheck, similar to the following.

Also display a report (or "pay stub"), that includes all of the information for this employee.
PAYSTUB:
Employee data:
	Employee ID:  9842
	Last name:    Doe
	First name:   John
	Hourly rate:  $ 10.00
	Pay code:     1
This week's payroll data:
	Hours worked: 44.1
	Gross pay:    $ 461.50 
	Income tax:   $  68.15 
	FICA:         $  73.85 
	Net pay:      $ 319.50 


CALCULATIONS:

GROSS PAY: The gross pay amount shall be calculated from the pay rate and the hours worked.
If the "pay code" is greater than one (exempt from overtime pay), multiply the hours worked by the hourly pay rate. However, if the "pay code" is 1 (or less), then all hours over 40 (per week) are paid at "time-and-a-half" (i.e. 1.5 times the hourly rate).

DEDUCTIONS: Calculate Income Tax and FICA deductions, and subtract these from the net pay that appears on the paycheck. Use the "Single with no exemptions" table (5.5) for Income Tax, and use 15.3% of gross pay for the FICA amount.

NET PAY: Subtract the two deductions from gross-pay to obtain net-pay.


NOTE:   This program is intended to be used by a "payroll clerk" to produce paychecks and paystubs for any number of employees from a weekly list of hours worked by each employee.

Version "pay2" adds include various "deductions", and also add one or more buttons to produce "reports", to be displayed in the same listbox that was used for "pay stub".

You will need to accumulate various counts, totals, and averages, such as the number of employees paid, the total number of hours worked, the total payroll amount for all employees paid, the average pay-per-hour, the percentage of non-exempt employees who who actually worked any overtime hours, etc., and other summary information, to be displayed in these reports.

Version "pay4" reads the employee data from a file (and copies the strings into the textboxes), rather than having the user input this data. Future versions will use arrays, to look up the employee data based on ID #.


MODULARIZE:

Be sure to modularize your code, so that tasks are performed only in subs and functions that are called by your event-handlers. Event handlers should do no input, nor output, nor computation.