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 trialJeongeui Ji
3,761 Pointscant totally understand the question
I added the field in the first question and then in the second one, I do not understand whether I am to add another class or constructor... Can anybody help me please?
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 reactionTIme(int ReactionTime)
{
reactionTime = Reactiontime;
}
}
}
1 Answer
Steven Parker
231,248 PointsTask 2 says: "Add a second parameter to the constructor ..."
But it looks like you added an entire new method named reactionTIme.
Remember, the constructor of a class always has the same name as the class itself. So for this task, you will be adding another argument to the existing constructor Frog, and another line of code inside it.