DESCRIPTION:
Process the weekly payroll for employees of a company.
For each employee, compute the weekly pay amount and print a paycheck.
Then, print a payroll summary report.
INPUT: For each employee, the following input data shall be manually entered, as prompted for by the program:
CALCULATIONS: The gross pay amount shall be calculated from the pay rate and the hours worked. For this version of the project, multiply the hours worked by the hourly pay rate for any employee whose code is greater than one. If the pay code is one (1), then that employee is entitled to "time-and-a-half" for each hour worked beyond the first 40 hours.
OUTPUT: When pay is computed for each employee, the program shall display a simulated check similar to the following.
Pay to the order of John Doe the amount of $ 123.45
After the payroll processing is completed, the program shall display a report including the following:
CLASSES: Implement this version with two classes, as described below.
class XYZEmployee:
Data should include separate Strings for Last and First name,
as well as the above data (ID, code, rate, and hours).
(No construcors are necessary.)
Additional data elements should also include "grosspay".
Methods shall include a method to calculate gross pay, as described above.
class XYZPay2:
Instantiate a single instance of an "Employee" object,
then re-use it for each employee.
Use a loop to input data, process it, and produce a paycheck
for each employee. Exit the loop when an ID of zero is given.
Then produce the report.
Suggested steps for the main loop are: