Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
        }