Override!


#1



https://www.codecademy.com/courses/ruby-beginner-en-MFiQ6/2/3?curriculum_id=5059f8619189a5000201fbcb#


superclass mismatch for class Dragon


class Creature
  def initialize(name)
    @name = name
  end
  
  def fight
    return "Punch to the chops!"
  end
end

# Add your code below!
class Dragon < Creature
    def fight
        return "Breathes fire!"
    end
end


#2

I'm confused. Is there a problem? Please describe what you're looking for, what you've done, what you want to be different etc


#3

i got the error as described but refreshed the page and it worked. maybe a bug in the site


#4

The code below is the answer if you need it

class Creature
def initialize(name)
@name = name
end
def fight
return "Punch to the chops!"
end
end
class Dragon < Creature
def fight
return "Breathes fire!"
end
end


#5

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