this is my homework assignment, I saw it posted on the website before, but it looks like it was unsolved and I got a different error message than a person asking that questi
Yes, your init function does not have variable named salary, which gives error when you passed it in to Employee.init.
class Executive(Employee):
def __init__(self, name, wage, yearlyBonus):
Employee.__init__(self, name, salary)
when you do this
executive = Executive("Kerry", 520000, 1040000)
which one correlates to the salary? passed that as the employee init method. Better if you call the Employee constructor with super
Guessing from this method
def wage(self):
return self._salary/26
Maybe this is what you want (not sure how to account yearlyBonus though)
class Executive(Employee):
def __init__(self, name, wage, yearlyBonus):
Employee.__init__(self, name, wage * 26)