style=”color:rgb(34,34,34);background-color:transparent;”> with the following fields:
Design a Payroll class<span< h1=””>
style=”color:rgb(34,34,34);background-color:transparent;”> with the following fields:
• name: a String containing the employee’s name
• idNumber: an int representing the employee’s ID number
• rate: a double containing the employee’s hourly pay rate
• hours: an int representing the number of hours this employee has worked
The class should also have the following methods:
• Constructor: takes the employee’s name and ID number as arguments
• Accessors: allow access to all of the fields of the Payroll class
• Mutators: let the user assign values to the fields of the Payroll class
• grossPay: returns the employee’s gross pay, which is calculated as the number of
hours worked times the hourly pay rate.
Write program that demonstrates the class by creating a Payroll object, then
asking the user to enter the data for an employee in the order: name, ID number, rate, hours.
The program should then print out a statement in the following format (for example, if
you had an employee named Chris Jacobsen with ID number 11111, who works for 5 hours at
$10/hr):
</span<>
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"
![](https://sp-ao.shortpixel.ai/client/to_auto,q_glossy,ret_img,w_320,h_80/https://coursesolver.com/wp-content/uploads/2019/10/order_now.png)