Question: Note: Lab 7 i s used and expanded i n lab 1 0 . I f you d o not complete lab 7 , you

Note: Lab 7is used and expanded in lab 10.If you do not complete lab 7, you will not be able to
complete lab 10.
For this lab you will modify your class from Lab 6. Add the following attributesmethods to your
worker class.
The worker should have the following new attributes:
* Hourly salary
* Overtime hourly salary
And the following new methods:
*sethourlysalary(x)
o Sets the workers hourly salary.
oIf the salary given is less than zero, return false, else, return true
*setovertimesalary(x)
o Sets the workers overtime salary.
oIf the salary given is less than zero, return false, else, return true
*gethourlysalary()
o Returns the workers hourly salary
*getovertimesalary()
o Returns the worker's overtime salary
*getpay()
o Returns the workers total pay
o Pay is: (hoursworked *hourlysalary)+(overtime*overtimesalary)

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!