Well, yes. Your constructor for EmployedWorker takes a single argument, which is its salary. But your sonOfTheBoss function has called its variable name. Look at your EmployedWorker constructor:
class EmployedWorker<Employee
def initialize(salary = 0.0)
super(name) # what is 'name' supposed to be???
self.salary = salary
end
end
You tried to pass name to the parent class, but name is not defined. You probably wanted to write something like:
class EmployedWorker<Employee
def initialize(name = "no name", salary = 0.0)
super(name)
self.salary = salary
end
end
You can then create your instances with values:
me = EmployedWorker.new("me", 1000000)
me.show_salary