title: Having trouble with this exercise
body: <p>I am working on <em>Head First Ruby</em>. Here is my code:</p>
  
  <pre><code>class Employee
    attr_reader :name
  
    def name=(name)
    end
  
    def print_name
      puts "Name: #{name}"
    end
  end
  
  class SalariedEmployee &lt; Employee
    attr_reader :salary
  
    def salary=(salary)
      # code to validate and set @salary
    end
  
    def print_pay_stub
      print_name
      pay_for_period = (salary / 365.0) * 14
      formatted_pay = format("$%.2f", pay_for_period)
      puts "Pay this period: #{formatted_pay}"
    end
  end
  
  class HourlyEmployee &lt; Employee
    attr_reader :hourly_wage, :hours_per_week
  
    def hourly_wage=(hourly_wage)
      # code to validate and set @hourly_wage
    end
  
    def hours_per_week=(hours_per_week)
      # code to validate and set @hours_per_week
    end
  
    def print_pay_stub
      print_name
      pay_for_period = hourly_wage * hours_per_week * 2
      formatted_pay = format("$%.2f", pay_for_period)
      puts "pay This Period: #{formatted_pay}"
    end
  end
  </code></pre>
  
  <p>I cannot get this exercise to work. I get this error:</p>
  
  <pre><code>employee.rb:42:in `print_pay_stub': undefined method `*' for nil:NilClass (NoMethodError)
  from employee.rb:56:in `&lt;main&gt;'
  </code></pre>
  
  <p>Could someone look over this code and tell what is going wrong?</p>