Exemplo n.º 1
0
        static void FruitSample()
        {
            Fruit myFruit = new Fruit();

            myFruit.EatFruit();
            Apple myApple = new Apple();

            myApple.EatFruit();
            RanchStyle ranch = new RanchStyle("Stone", "Triple Pane", "composite", "Blue");

            ranch.OpenDoor();
            Console.WriteLine(ranch.Roof);
            Console.WriteLine(ranch.PaintDoor);
        }
Exemplo n.º 2
0
        static void FruitSample()
        {
            Apple myApple = new Apple();

            myApple.EatFruit();

            Fruit  myFruit  = new Fruit();
            Orange myOrange = new Orange();

            myOrange.EatFruit();


            RanchStyle ranch = new RanchStyle("Stone", "Triple Pane", "Composite", "Blue");

            ranch.OpenDoor();
            Console.WriteLine(ranch.Roof);
        }