static void Main(string[] args) { //get a new garden myGarden = new FruitGarden(); Console.WriteLine(myGarden.PlantFruit("banana")); //returns "You grew one banana!" Console.WriteLine(myGarden.PlantFruit("apple")); //returns "You grew one apple!" Console.WriteLine(myGarden.PlantFruit("orange")); //returns "You can't grow that type of fruit!" EatFruits(); }
static void Main(string[] args) { FruitGarden fruitGarden = new FruitGarden(); fruitGarden.EatFruits(); }
static void Main(string[] args) { FruitGarden fruitGarden = new FruitGarden(); // Use fruitGarden }