Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

I am getting an error here pls help me

Answers

  • What kind of error are you getting? This screenshot doesn't tell much, because it doesn't show all code in horizontal. I guess it might be in lines 15 and 16. Also you might change String into string in line 8.

    Do you have in lines 15 and 16 code like this?

    Console.WriteLine("age :" + age.ToString());

    Console.WriteLine("happiness: " + happiness.ToString());

  • AliamAliam Member

    This is it

  • AliamAliam Member


  • Is it because the 'Bark' function doesn't belong to the Animal or Dog class, but you are trying to access it through 'Spotty'

  • WarpWarp Administrator

    Move the function definition for "bark" inside of your dog class.

Sign In or Register to comment.