Question: I need help finishing this one. The program should read payroll information from a file payroll.txt and print out the pay for each employee, the

I need help finishing this one.

The program should read payroll information from a file "payroll.txt" and print out the pay for each employee, the total pay for all employees, and the average pay per employee. Each line of payroll.txt will contain the number of hours an employee worked followed by the pay rate of that employee; both numbers are doubles. The pay for an employee is simply the number of hours worked by the employee multiplied by the employee's pay rate; however, there is also a $50 bonus for any employee who worked more than 40 hours. As an example, if payroll.txt contains: 30.0 8.25 40.0 15.00 20.5 10.00 45.0 15.00 Your output should be: 247.5 600.0 205.0 725.0 Total Pay: 1777.5 Average Pay: 444.375 Name of program should be: PayrollProcessor

This is what I have right so far =

import java.util.*;

import java.io.*;

public class payroll { public static void main (String [] args) throws IOException

{ File file = new File ("payroll.txt");

Scanner s = new Scanner(System.in);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!