static void Main(string[] args)
 {
     BMW bmw = new BMW(10000);
     Volkswagen volks = new Volkswagen(150);
     Audi audi = new Audi(300);
     bool test = false;
     Console.WriteLine(bmw.IsEcoFriendly(test));
     Console.WriteLine(volks.IsEcoFriendly(test));
     Console.WriteLine(audi.IsEcoFriendly(test));
 }
示例#2
0
        static void Main(string[] args)
        {
            BMW        bmw   = new BMW(10000);
            Volkswagen volks = new Volkswagen(150);
            Audi       audi  = new Audi(300);
            bool       test  = false;

            Console.WriteLine(bmw.IsEcoFriendly(test));
            Console.WriteLine(volks.IsEcoFriendly(test));
            Console.WriteLine(audi.IsEcoFriendly(test));
        }