C# C# Objects Methods Methods

michael edmondson
michael edmondson
3,260 Points

Parameter

Hey i clearly have the Parameters there i know im looking over something small can someone tell me what it is?

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

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

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,027 Points

You receive: Bummer: Did you create a parameter in your method named distanceToFly? because of the space before int for your parameter for EatFly. Remove that space.

As far as what EatFly returns you will need to consider if the distance to the fly is less than or equal to the frog's tongue length.