Question: Just like _ _ init _ _ ( ) method, the _ str _ _ O method is called automatically when the object is passed

Just like__init__() method, the _ str__ O method is called automatically when the object is passed as an argument to the print function. The _ str.__returns a string
Activity: Employee Payroll system (30 points)
Include the following statements to main() above.
a. A statement that will add an object named sugar that has 'Sugar' for name, 1.95 for price and 28 for quantity.
b. A statement that will increase the quantity to 50
c. A statement that will remove 16 from the quantity
d. A statement that display the object sugar
Task ?22( points)
Write a program that will include the following.
A definition of a class that represents employees of ABC Company Limited. An employee's object will have name, gender, hourly wage rate and the maximum biweekly hours.
The maximum biweekly hours is global to the class - common to all objects of the class. Declare it outside of all the class methods but within the class, Use the class name to reference the attribute. For example:and method that will calculate the net pay using the formula:
{:or
Task if (6 points)
Write s main function that will define 3 objects of employee class and test the methods.

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 Programming Questions!