[Solved]Java Must Use Arraylength Payroll Class Write Payroll Class Uses Following Arrays Fields E Q37278949
In JAVA must use Array.length
Payroll Class
Write a Payroll class that uses the following arrays asfields:
• employseid. An array of seven integers to hold employeeidentification numbers. The
array should be initialized with the following numbers:
56588 45201 78951 87775
84512 13028 75804
• hours. An array of seven integers to hold the number of hoursworked by each
employee
• payRate. An array of seven doubles to hold each employees hourlypay rate
• wages. An array of seven doubles to hold each employees grosswages
The class should relate the data in each array through thesubscripts. For example, the
number in element 0 of the hours array should be the number ofhours worked by the
employee whose identification number is stored in element 0 of theemployeeId array.
That same employee’s pay rate should be stored in element 0 of thepayRate array.
In addition to the appropriate accessor and mutator methods, theclass should have a
method getWages that accepts an employee’s identification number asan argument
and returns the gross pay for that employee. Print output similarto this:
employeeId hours payRate wages
56588 40 13.60 544.00
45201 41 13.50 553.50
78951 42 13.40 562.80
87775 43 13.30 571.90
84512 44 13.20 580.80
13028 45 13.10 589.50
75804 46 13.00 598.00
Expert Answer
Answer to In JAVA must use Array.length Payroll Class Write a Payroll class that uses the following arrays as fields: • employse… . . .
OR

