
class Person
  def work
    puts "do some work...\n"
  end
end

class Chef
  attr :worker

  def initialize()
    @worker = []
    hire(rand(3)+2)
  end
  
  def hire(num)
    num.times {
      @worker.push(Person.new)
    }
  end
  
  def delegate_work
    @worker.each_with_index { |person, nr|
      print "Person #{nr+1}: "
      person.work
    }
  end
end


    
