Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a Payroll class that has that has filedsfor an employee’s name, ID number

ID: 3616370 • Letter: D

Question

Design a Payroll class that has that has filedsfor an employee’s name, ID number, hourly pay rate, andnumber of hours worked. Write the appropriate accessor and mutatormethods and a constructor that accepts the employee’s nameand ID number as arguments. The class should also have a methodthat returns the employee’s gross pay, which is calculated asthe number of hours worked multiplied by the hourly pay rate. Writea program that demonstrates the class by creating aPayroll object, then asking the user to enter thedata for an employee. The program should display the amount ofgross pay.

Explanation / Answer

x.