//in your main method you should create a garden with flowers and trees //The program should demonstrate an example garden //two flowers(yellow and blue) //two trees(purple and orange) //after creating them you should show the user, how the garden looks like //After that the program should water the garden twice //first with the amount of 40 then with 70 //after every watering the user should see the state of the garden static void Main(string[] args) { //var flowerone = new Flower(4, "pink"); //newgarden.FlowerTree.Add(flowerone); //vagy newgarden.FlowerTree.Add(new Flower(5, "yellow")); //vagy newgarden.Planting(new Flower(4, "yellow flower")); Garden newgarden = new Garden(); newgarden.Planting(new Flower(4, "yellow flower")); newgarden.Planting(new Flower(4, "blue flower")); newgarden.Planting(new Tree(7, "purple tree")); newgarden.Planting(new Tree(7, "orange tree")); newgarden.Watering(0); Console.WriteLine(); newgarden.Watering(40); Console.WriteLine(); newgarden.Watering(70); Console.ReadLine(); }
static void Main(string[] args) { Garden garden = new Garden(); Flower yellowFlower = new Flower(Color.Yellow); Flower blueFlower = new Flower(Color.Blue); Tree purpleTree = new Tree(Color.Purple); Tree orangeTree = new Tree(Color.Orange); garden.AddPlant(yellowFlower); garden.AddPlant(blueFlower); garden.AddPlant(purpleTree); garden.AddPlant(orangeTree); garden.ShowGarden(); Console.WriteLine(); garden.WaterPlants(40); Console.WriteLine(); garden.ShowGarden(); Console.WriteLine(); garden.WaterPlants(70); Console.WriteLine(); garden.ShowGarden(); Console.ReadLine(); }
static void Main(string[] args) { Garden garden = new Garden(); garden.Water(40); garden.Water(70); Console.ReadLine(); }
static void Main(string[] args) { var myGarden = new Garden(); myGarden.CreateMyGarden(); myGarden.WaterTheGarden(40); myGarden.WaterTheGarden(70); Console.Read(); }
static void Main(string[] args) { Garden johely = new Garden(); johely.AddPlant(new Flower("yellow")); johely.AddPlant(new Flower("blue")); johely.AddPlant(new Tree("purple")); johely.AddPlant(new Tree("orange")); johely.StateOfGarden(); johely.Water(40); johely.StateOfGarden(); johely.Water(50); johely.StateOfGarden(); Console.ReadLine(); }
static void Main(string[] args) { var garden = new Garden(); garden.AddFlower("Purple"); garden.AddFlower("Yellow"); garden.AddTree("Green"); garden.AddTree("Orange"); garden.DaysHavePassed(3); garden.PrintInfo(); garden.Watering(10); garden.PrintInfo(); Console.ReadLine(); }
static void Main(string[] args) { Garden garden = new Garden(); garden.AddPlant(new Flower("yellow")); garden.AddPlant(new Flower("blue")); garden.AddPlant(new Tree("purple")); garden.AddPlant(new Tree("orange")); garden.ShowGarden(); garden.WaterPlants(40); garden.WaterPlants(70); Console.ReadLine(); }
static void Main(string[] args) { Garden garden = new Garden(); Flower flower1 = new Flower("yellow"); Flower flower2 = new Flower("blue"); Tree tree1 = new Tree("purple"); Tree tree2 = new Tree("orange"); garden.Add(flower1); garden.Add(flower2); garden.Add(tree1); garden.Add(tree2); garden.GetStatus(); garden.Watering(40); garden.GetStatus(); garden.Watering(70); garden.GetStatus(); Console.ReadLine(); }
static void Main(string[] args) { var garden = new Garden("kert"); var flower1 = new Flower(3); var flower2 = new Flower(0); var tree1 = new Tree(2); var tree2 = new Tree(1); garden.AddPlant(flower1); garden.AddPlant(flower2); garden.AddPlant(tree1); garden.AddPlant(tree2); garden.Print(); garden.Watering(40); garden.Print(); garden.Watering(70); garden.Print(); Console.ReadLine(); }
static void Main(string[] args) { Flower firstFlower = new Flower("GREEN"); Flower secondFlower = new Flower("RED"); Tree firstTree = new Tree("PURPLE"); Tree secondTree = new Tree("ORANGE"); Garden kert = new Garden(); kert.AddToMyGarden(firstFlower); kert.AddToMyGarden(secondFlower); kert.AddToMyGarden(firstTree); kert.AddToMyGarden(secondTree); kert.Watering(40); kert.MyGarden(); kert.Watering(40); kert.MyGarden(); Console.ReadLine(); }
static void Main(string[] args) { Garden garden = new Garden(); garden.AddFlowers(new List <Flower>() { new Flower("yellow"), new Flower("blue") }); garden.AddTrees(new List <Tree>() { new Tree("purple"), new Tree("orange") }); garden.DisplayStatusReport(); garden.Water(40); garden.DisplayStatusReport(); garden.Water(70); garden.DisplayStatusReport(); Console.ReadKey(); }
public void AddPlant(Garden plant) { flowersAndTrees.Add(plant); wateringList.Add(plant); }