Beispiel #1
0
        public static void Main(string[] args)
        {
            CarLot  TruckLot = new CarLot("Trucks");
            Vehicle vehicle1 = new Truck("ABCD123", "Ford", "F150", 45000, 6);
            Vehicle vehicle2 = new Truck("DCBA321", "Toyota", "Tacoma", 35000, 4);

            TruckLot.AddCars(vehicle1);
            TruckLot.AddCars(vehicle2);
            TruckLot.PrintInventory();


            CarLot  CarLot   = new CarLot("Cars");
            Vehicle vehicle3 = new Car("FGHJ123", "Nissan", "Rogue", 28000, 4);
            Vehicle vehicle4 = new Car("FGHJ321", "Honda", "Odyssey", "Van", 36000, 4);

            CarLot.AddCars(vehicle3);
            CarLot.AddCars(vehicle4);
            CarLot.PrintInventory();
            Console.Read();
        }