예제 #1
0
 static void Main(string[] args)
 {
     Honda civic = new Honda();
     Console.WriteLine(civic.IsEcoFriendly(false));
     VW passat = new VW(123.123m);
     Console.WriteLine(passat.IsEcoFriendly(true));
     Console.WriteLine(passat.SpeedMeter());
    
 }
예제 #2
0
        static void Main(string[] args)
        {
            Audi a = new Audi();
            Console.WriteLine(a.IsEcoFriendly(false));
            a.MoveNKilometers(23);
            Console.WriteLine(a.Mileage);
            BMW b = new BMW();
            Console.WriteLine(b.IsEcoFriendly(false));
            b.MoveNKilometers(45);
            Console.WriteLine(b.Mileage);
            Volkswagen v = new Volkswagen();
            Console.WriteLine(v.IsEcoFriendly(false));
            v.MoveNKilometers(88);
            Console.WriteLine(v.Mileage);
            Honda h = new Honda();
            Console.WriteLine(h.IsEcoFriendly(false));
            Skoda s = new Skoda();
            Console.WriteLine(s.IsEcoFriendly(false));

            Console.ReadKey();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Audi a7 = new Audi();
            a7.Move(30000);
            Console.WriteLine("Audi a7 has passed {0} miles", a7.Mileage);
            Console.WriteLine("Audi a7 is eco friendly: {0}", a7.IsEcoFriendly(false));

            BMW m5 = new BMW();
            m5.Move(90000);
            Console.WriteLine("Bmw m5 has passed {0} miles", m5.Mileage);
            Console.WriteLine("Bmw m5 is eco friendly: {0}", m5.IsEcoFriendly(false));

            Volkswagen golf = new Volkswagen();
            golf.Move(135000);
            Console.WriteLine("Volkswagen golf has passed {0} miles", golf.Mileage);
            Console.WriteLine("Volkswagen golf is eco friendly: {0}", golf.IsEcoFriendly(false));

            Honda civic = new Honda();
            Console.WriteLine("Honda civic is eco friendly: {0}", civic.IsEcoFriendly(false));

            Skoda fabia = new Skoda();
            Console.WriteLine("Skoda fabia is eco friendly: {0}", fabia.IsEcoFriendly(false));
        }