Question: Please answer question 8.22 Python 3.0 for language Comment for each part of line of code explaining what is being done 8.22 Implement class Worker

Please answer question 8.22
Python 3.0 for language
Comment for each part of line of code explaining what is being done
 Please answer question 8.22 Python 3.0 for language Comment for each

8.22 Implement class Worker that supports me thods: hourly pay rate (as a number) Constructor that takes as input the worker's name (as a string) angeRate (): Takes the new pay rate as input and changes the worker's pay the new hourly rate pay): Takes the number of hours worked as input and prints Not Implement Next develop classes HourlyWorke overloads the inherited method pay) to compute the weekly pay for the worker. H orkers are paid the hourly rate for the actual hours worked; any overtime hoursa Worker. Each ourly e 40 r and SalariedWorker as subclasses of are paid double. Salaried workers are paid for 40 hours regardless of the number of hours ecause the number of hours is not relevant, the method pay() for salaried should also be callable without an input argument. >>>w1 Worker( Joe', 15) >>> w1.pay(35) Not implemented >#2 SalariedWorker'Sue', 14.50) >>>w2.pay() 580.0 >>>w2.pay (60) 580.0 >>>w3 HourlyWorker ( 'Dana', 20) >>> w3.pay (25) 500 >>>w3.changeRate (35) >>> w3.pay (25) 875

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!