Implement this following features and restrictions to Test Case #1 (your existing program):
1. Strictly impose proper logging-in and out. The computation of total hours worked should follow the work schedule 8:00 to 12:00 in the morning and 1:00 to 5:00 in the afternoon.
For example:
If the employee came early in the morning, let us say 7:30 AM. The system should still consider this as 8:00 AM. Likewise, if the employee logged-out in the morning at 12:15 PM the system will still consider this as 12:00 PM. Similarly, if the employee logs-in in the afternoon at 12:50 PM it will still be considered as 1:00 PM.
2. Include computation for overtime hours
Formulas:
Regular Hour Rate = Daily Rate / 8
Overtime Hour Rate = Regular Hour Rate + 2%
Note: Overtime hours starts from 5:01 PM to 12:00 AM
3. Modify Gross Pay Screen
Example:
...
Total Regular Hours Worked: 40.0
Total Overtime Hours: 5.0
Hourly Rate: 68.75
Overtime Rate: 70.125
Gross Pay: 3100.625