Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I keep getting the error code missing 1 required positional argument: 'self' can you help me fix it ? #Creating employee class class employee: def
I keep getting the error code "missing required positional argument: 'self' can you help me fix it
#Creating employee class
class employee:
def initself name, employeeGender,employeeHourlyRate, employeeNumber:
self.name name
self.employeeGender employeeGender
self.employeeHourlyRate employeeHourlyRate
self.employeeNumber employeeNumber
def getnameself:
return self.name
def setnameself name:
self.name name
def getemployeeGenderself:
return self.employeeGender
def setemployeeGenderself employeeGender:
self.employeeGender employeeGender
def getemployeeHourlyRateself:
return self.employeeHourlyRate
def setemployeeHourlyRateself employeeHourlyRate:
self.employeeHourlyRate employeeHourlyRate
def setemployeeNumberself:
return self.employeeNumber
def getemployeeNumberself:
self.employeeNumber employeeNumber
#creating productionworker class
class productionWorkeremployee:
def initself name, employeeGender,employeeHourlyRate, employeeNumber, employeeShiftNumber:
superinitself name, employeeGender,employeeHourlyRate, employeeNumber
self.employeeShiftNumber employeeShiftNumber
def getemployeeShiftNumberself:
return self.employeeShiftNumber
def setemployeeShiftNumberself employeeShiftNumber:
self.employeeShiftNumber employeeShiftNumber
#accessing and modifying info
printEmployee name:", productionWorker.getname
printEmployee Gender: prodcutionWorker.getemployeeGender
printEmployee Hourly Rate: productionWorker.getemployeeHourlyRate
printEmployee Number: productionWorker.getemployeeNumber
printEmployee Shift Number: productionWorker.getemployeeShiftNumber
productionWorker.setnameDenise Bazan"
productionWorker.setemployeeGenderFemale
productionWorker.setemployeeHourlyRate$
productionWorker.setemployeeNumber
productionWorker.setemployeeShiftNumber
Step 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