Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

image text in transcribed

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: 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions