C# C# Objects Methods Methods

Jason Smith
Jason Smith
5,860 Points

i'm not sure how to measure the parameter "distanceToFly". any hints?

any explanation appreciated.

Frog.cs
namespace Treehouse.CodeChallenges
{
    class Frog
    {
        public readonly int TongueLength;

        public Frog(int tongueLength)
        {
            TongueLength = tongueLength;
        }
        public bool EatFly(int distanceToFly)
        {

        }
    }
}

1 Answer

Steven Parker
Steven Parker
182,566 Points

If you compare the distance to the fly to the length of the frog's tongue, you can tell if the frog can eat the fly from where he is sitting. And you could "return" the result of that comparison.