示例#1
0
        static void Main(string[] args)
        {
            MeioTransporte c = new Carro();

            c.Modelo = "Astra";
            c.Mover();

            MeioTransporte a = new Aviao();

            a.Modelo = "F22";
            a.Mover();
        }
示例#2
0
        static void Main(string[] args)
        {
            Transporte c = new Carro();

            c.Marca  = "GM";
            c.Modelo = "Astra";
            c.Mover();

            Transporte a = new Aviao();

            a.Modelo = "F22";
            a.Mover();
            Console.ReadLine();
        }
示例#3
0
        static void Main(string[] args)
        {
            MeioTransporte carro = new Carro();

            carro.Modelo = "Astra";
            carro.Mover();

            MeioTransporte aviao = new Aviao();

            aviao.Modelo = "F22";
            aviao.Mover();

            Console.ReadLine();
        }
示例#4
0
        static void Main(string[] args)
        {
            MeioTransporte carro = new Carro
            {
                Modelo = "Honda Civic"
            };

            carro.Mover();

            MeioTransporte aviao = new Aviao
            {
                Modelo = "F22"
            };

            aviao.Mover();

            Console.ReadLine();
        }