Example #1
0
        static void Main(string[] args)
        {
            Car car = new Car("Audi", "1990", "blue");

            TuningAtelier.TuneCar(car);
            Console.WriteLine(car.Color.ToString());
        }
Example #2
0
        public void Show()
        {
            Console.Write("Car\n" + "Model: " + model + " \nYear: " + year + " \nColor: ");

            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine(Color);
            Console.ResetColor();

            Car car = new Car();

            Console.Write("Color after painting: ");
            TuningAtelier.TuneCar(car);
        }
Example #3
0
        static void Main(string[] args)
        {
            var myCarAudi = new Car();

            myCarAudi.Model = "Audi";
            myCarAudi.Year  = 2010;
            myCarAudi.Color = "Black";

            var myCarBmw = new Car("BMW", 1999, "Green");

            Console.WriteLine("Cars before tuning:");
            Console.WriteLine(myCarAudi);
            Console.WriteLine(myCarBmw);

            TuningAtelier.TuneCar(myCarAudi);
            TuningAtelier.TuneCar(myCarBmw);

            Console.WriteLine("\nCars after tuning:");
            Console.WriteLine(myCarAudi);
            Console.WriteLine(myCarBmw);
            Console.ReadLine();
        }