The code has to be written in Java, and the text file mentioned is an assumption.
2) Answer the following: [20 marks]
There is a pre-existing text file (OvertimeDetail.txt) in your NetBeans Console application project folder containing the following employee ID, date, extra hours worked for a day, and overtime rate per hour stored line by line separated by commas. If an employee does overtime for 5 days, then there will be 5 rows for that employee, and so on.
Now, in your main method of MainClass of your CONSOLE application, write the code to read the OvertimeDetail.txt and create another file called OvertimeReport.txt where employee ID and total overtime amount of each employee for ALL days will be stored line by line separated by commas. In this file, there will be exactly one row for each employee.
Write the complete main method to do the above as follows:
public class MainClass {
public static void main(String[] args) {
// your code 1
}
}