Need Help - Inheritance Code


#1


Oops, try again. Your code raised an exception, have a look at the console window for the error message!

Traceback (most recent call last):
File "python", line 11, in
File "python", line 21, in PartTimeEmployee
File "python", line 17, in full_time_wage
AttributeError: type object 'PartTimeEmployee' has no attribute 'self'


class Employee(object):
    """Models real-life employees!"""
    def __init__(self, employee_name):
        self.employee_name = employee_name

    def calculate_wage(self, hours):
        self.hours = hours
        return hours * 20.00

# Add your code below!
class PartTimeEmployee(Employee):
    def calculate_wage(self, hours):
        self.hours = hours
        return hours * 12.00

    def full_time_wage(self, hours):
        return super(PartTimeEmployee,self).method(args)


Correct Output Should display


Replace this line with your code.


#2

here:

return super(PartTimeEmployee,self).method(args)

method and arguments are terms for general syntax. What method should you actually call here? And which argument goes with it?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.