Question: This is java programing. Pleas work in eclips/jGrasp Create an ADT that represents an hourly worker and his weekly hours. The hourly worker instance should

This is java programing. Pleas work in eclips/jGrasp

This is java programing. Pleas work in eclips/jGrasp Create an ADT that

Create an ADT that represents an hourly worker and his weekly hours. The hourly worker instance should have the following properties: String name, integer id, double hourly rate, double array that represents the number of hours worked each day of the week (hourly workers may work up to 7 days a week). Add a class level field that counts the number of hourly worker objects. The worker's id should be set up in the following way: worker id its object number, i.e. the first worker created by client code should have id 1, the second worker created by client code should have id 2, the third worker created by client code should have id 3, etc. 0, payrate>0, Add the following methods to your ADT, implementing the following class invariant: daily hours and make sure your code does not violate encapsulation principles parameterless and parameterized constructors (parameters: name, hourly rate, array with hours) copy constructor that creates a deep copy of an object (if covered during the lecture) a. get methods for all the fields set methods for a name and an hourly rate toString method setHours method that takes the number representing the day of the week and the number of hours worked that day and resets the hours worked that day resetHours method that has no parameters and resets hours for each day to zeros addHours method that takes the number representing the day of the week and the number of hours worked that day and adds it to the current hours worked that day calculateHours method that adds up and returns the number of hours worked per week calculateWages method that calculates and returns weekly wages; weekly wages are calculated as weekly hours x payrate, except all overtime hours (>40) should be paid at 1.25 the regular rate

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!