Read an employee file, build Employee objects, and print a payroll report | Workbook p.17-18
Create a Java app called payroll-calculator. It reads employee data from a CSV-style text file where columns are separated by the | (pipe) character. Each line looks like:
10|Dana Wyatt|52.5|12.50 — that's id | name | hoursWorked | payRate.
Build an Employee class with private fields for each of those four values, a parameterized constructor that takes all four, getters (and setters if you want them), and a method getGrossPay() that returns hoursWorked * payRate.
In main, ask the user for the employee filename, open it with a BufferedReader, read it line by line, split each line on |, create an Employee object, and print a formatted row with printf showing id, name, and gross pay.
Workbook 3a, p.17-18 — Exercise: Payroll Calculator (Read)