Question: Create a class named Worker which contains a name attribute, available to the entire program ( public ) , an ID number, hours worked, and
Create a class named Worker which contains a name attribute, available to the entire program public an ID number, hours worked, and an hourly pay rate, available only to the members of the Worker class private Also write a constructor the init method which accepts the ID number, hours worked, and the hourly pay rate. The method should change the hourly pay rate to if the value entered is less than that. Do not write any accessor or mutator methods for the class.
Write one statement only one line of code that creates an object called hourlyWorker, from the Worker class and passes as the hourly pay rate.
Write one statement only one line of code that assigns "Jane Green" to the name attribute of the object created in part
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
