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 trialTojo Alex
Courses Plus Student 13,331 PointsI don't know what it means
I don't know what it means when it says : Did you instantiate the Frog class using the 'new' keyword? i have made the variable mike and made the class frog but i don't know what i did wrong.I also don't know what script i have to work in the Program script or the frog script.
namespace Treehouse.CodeChallenges
{
class Program
{
static void Main()
{
var mike();
}
}
}
namespace Treehouse.CodeChallenges
{
class Frog{
static void Main{
var mike();
}
}
}
2 Answers
Justin Horner
Treehouse Guest TeacherHi Tojo,
To pass the first task of the challenge, the Frog class does not need to have instance variables or methods. It simply needs to be an empty class like this.
namespace Treehouse.CodeChallenges
{
class Frog
{
}
}
The second task of the challenge wants you to create a variable with a value of a new Frog instance in Program.cs. You need to create a new variable and assign it the value of a new Frog instance. A new Frog instance can be created using the new keyword, like this
var frog = new Frog();
I hope this helps.
Tojo Alex
Courses Plus Student 13,331 Pointsi also noticed that it should be var mike =new Frog ();
Justin Horner
Treehouse Guest TeacherYou're welcome! You got it. The challenge expects the variable name to be mike.
Tojo Alex
Courses Plus Student 13,331 PointsTojo Alex
Courses Plus Student 13,331 Pointsthank you have a good day