It looks like you're new here. If you want to get involved, click one of these buttons!
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());
This is it
Is it because the 'Bark' function doesn't belong to the Animal or Dog class, but you are trying to access it through 'Spotty'
Move the function definition for "bark" inside of your dog class.
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());
This is it
Is it because the 'Bark' function doesn't belong to the Animal or Dog class, but you are trying to access it through 'Spotty'
Move the function definition for "bark" inside of your dog class.