Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Inside the Vehicle showroom");
            Console.WriteLine("");
            List <Car> cars = new List <Car>();

            Car fiesta = new Car("FES-UIT8", "60m/h", 200000, false);

            cars.Add(fiesta);

            Car ferrari = new Car("FER-IU8", "80m/h", 500000, false);

            cars.Add(ferrari);

            Console.WriteLine("********Car info before sell***********");
            fiesta.DisplayVehicleInfo();
            Console.WriteLine("***************************************");
            fiesta.sell(120000);

            Console.WriteLine("********Car info after selling***********");
            fiesta.DisplayVehicleInfo();
            Console.WriteLine("*****************************************");
        }