Question: ACME needs to calculate their payroll. The input will have an employee name, number of hours worked and hourly rate. There may be zero or

ACME needs to calculate their payroll. The input will have an employee name, number of hours worked and hourly rate. There may be zero or more employees. The data for one employee will all be on one line.

You can expect that both numbers could be floats.

Your program needs to input each line of data, calculate the paycheck for the employee.

Your program also builds a list where each element contains the employee name and the amount of their paycheck. Note: There are plenty of other ways to solve this problem. This list structure is the one that I want.

The input halts when the user presses just Enter. Remember input returns an empty string in that case.

After the data is all processed, report the total payroll (total of all paychecks).

Then print out the list of employees and their paychecks.

Sample run 1

Payroll for ACME Press Enter to stop Enter name, comma, hours worked, comma, hourly rate: Joe, 23, 11.0 Enter name, comma, hours worked, comma, hourly rate: Ralph, 44, 10.5 Enter name, comma, hours worked, comma, hourly rate: Mary, 34, 12.5 Enter name, comma, hours worked, comma, hourly rate: Don, 15, 25.5 Enter name, comma, hours worked, comma, hourly rate: Total payroll $1522.5 Joe $253.0 Ralph $462.0 Mary $425.0 Don $382.5

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!