Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help with Intro to Computer Science (Python) problem: 1. Write a class Worker (that is a subclass of the object class) supporting four methods:
Need help with Intro to Computer Science (Python) problem:
1. Write a class Worker (that is a subclass of the object class) supporting four methods: which takes a string representing the worker's name and a number representing the hourly rate the worker earns as init parameters and creates the object using these values. If no parameters are provided, then the default values used should be 'Jane Doe' and 8.25. b. change Rate which takes a number representing a new pay rate as a parameter and sets the worker's pay rate to the new value c. weekly Pay0 which takes a number representing the hours worked during a weekly pay period and returns the string Not Implemented' d. repr 0 which returns the canonical representation for the worker which includes both the worker's name and pay rate. The pay rate should be formatted to two decimal places. See the sample output below for details. e Python 3.4.1 Shell File Edit Shell Debug Options Windows Help wi Worker Djengo 15 1 Worker (Djengo, 15.00 w 1. weekly Pay (10) Not Implemented' U2 Worker Cookie 20.5 Worker (Cookie, 20.50 W2 weekly Pay (50) "Not Implemented' W2 change Rate (22.5) Worker (Cookie, 22.50 Ln: 49 Col: 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started