8. What am I Doing Wrong?


#1

Here is my code:

class Person
  def initialize(name)
    @name = name
    @age = age
    @profession = profession
  end
end

When I click Save and Submit, it says "Oops, try again. Did you add age and profession parameters to the initialize method?"


#2
def initialize(name, age)
  ...
end

would be a function with two parameters. You need name,age and profession.


#3

Along with the comment above me, you'd also (in addition to adding age) would have to add profession to initialize. Your error method tells you exactly that, "add age and profession parameters to the initialize method."