Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChad Deascenti
Courses Plus Student 2,774 PointsNot sure what is being asked here
Please advise
namespace Treehouse.CodeChallenges
{
class Frog
{
public readonly int TongueLength;
public Frog(int tongueLength)
{
TongueLength = tongueLength;
}
public bool EatFly(int distanceToFly)
{
return TongueLength >= distanceToFly;
}
public readonly int ReactionTime;
public readonly int ReactionTime2;
public reactionTime(int ReactionTime, int ReactionTime2)
{
ReactionTime = reactionTime;
ReactionTime2 = reactionTime2;
}
}
}
2 Answers
Steven Parker
231,236 PointsYou only need one "ReactionTime" field.
And since the name of the class is "Frog", the constructor method is also named "Frog". It is that method that the instructions are telling you to add the second parameter to.
Chad Deascenti
Courses Plus Student 2,774 PointsThank you very much
Austin Betzer
2,747 PointsAustin Betzer
2,747 PointsYou just need to make the Reaction time private field and then assign the filed to the property.