Question: With the provided code, finish the program. The output is included Payroll class lon * about employee's payroll data using * parallel arrays. */ public

With the provided code, finish the program. The output is included

With the provided code, finish the program. The output is included Payrollclass lon * about employee's payroll data using * parallel arrays. */public class Payroll { // Constant for the number of employees public

Payroll class lon * about employee's payroll data using * parallel arrays. */ public class Payroll { // Constant for the number of employees public final int NUM_EMPLOYEES = 7; = // Array of employee ID numbers private int[] employeeId { 5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 7580489}; // Array to hold hours worked private int[] hours = new int[NUM_EMPLOYEES]; I/ Array to hold pay rates // Array to hold wages earned /** * getGrossPay method * Returns the gross pay for the employee whose * data is stored at element i of each array. */ /** * set Employee IdAt method */ /** * setHoursAt method */ /** * setPayRateAt method */ /** * setWagesAt method */ /** getEmployeeIdAt method */ /** * getHoursAt method */ * getPayRateAt method /** * getWagesAt method */ } import java.util.Scanner; import java.text.DecimalFormat; /** * Chapter 7 * Programming Challenge 2: Payroll Class * This program demonstrates the Payroll class. */ public class PayrollDemo { public static void main(String[] args) { int hours; 11 Hours worked double payRate; // Hourly pay rate // Create a Scanner object for keyboard input. // Create a Payroll object. // Get the hours and pay rate for each employee. for (int i = 0; i } Enter the hours worked by employee number 5658845: 40 Enter the hourly pay rate for employee number 5658845: 25 Enter the hours worked by employee number 4520125: 35 Enter the hourly pay rate for employee number 4520125: 15 Enter the hours worked by employee number 7895122: 40 Enter the hourly pay rate for employee number 7895122: 34 Enter the hours worked by employee number 8777541: 40 Enter the hourly pay rate for employee number 8777541: 30 Enter the hours worked by employee number 8451277: 40 Enter the hourly pay rate for employee number 8451277: 24 Enter the hours worked by employee number 1302850: 5 Enter the hourly pay rate for employee number 1302850: 10 Enter the hours worked by employee number 7580489: 40 Enter the hourly pay rate for employee number 7580489: 30 PAYROLL DATA ======= Employee ID: 5658845 Gross pay: $1,000.00 Employee ID: 4520125 Gross pay: $525.00 Employee ID: 7895122 Gross pay: $1,360.00 Employee ID: 8777541 Gross pay: $1,200.00 Employee ID: 8451277 Gross pay: $960.00 Employee ID: 1302850 Gross pay: $50.00 Employee ID: 7580489 Gross pay: $1,200.00

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!