static ExtendedList<ICar> GetCars() { var car1Spec = new GasolineCarSpecifications { AverageCostOfKilometerBYB = 1000, EngineCapacityL = 1.8f, FuelConsumptionLP100Km = 10, MaxSpeedKmPH = 200, NumberOfSeats = 5 }; Car car1 = new Car("Pegeot", "406", DateTime.Parse("20/07/1998"), "1234AB-7", car1Spec) { PriceBYB = 30000000 }; var car2Spec = new GasolineCarSpecifications { AverageCostOfKilometerBYB = 850, EngineCapacityL = 2.0f, FuelConsumptionLP100Km = 7, MaxSpeedKmPH = 240, NumberOfSeats = 4 }; var car2 = new Car("Toyota", "Camry", DateTime.Parse("01/02/2013"), "1120IK-7", car2Spec) { PriceBYB = 25000000 }; var car3Spec = new ElectricCarSpecifications { AverageCostOfKilometerBYB = 50, MaxSpeedKmPH = 260, NumberOfSeats = 4, FullChargingTime = TimeSpan.FromHours(10) }; var car3 = new Car("Tesla", "Model S", DateTime.Parse("22/06/2012"), "1444IK-7", car3Spec) { PriceBYB = 399000000 }; car3Spec.FullChargingTime = TimeSpan.FromHours(8); car3Spec.MaxSpeedKmPH = 270; var car4 = new Car("Tesla", "Model S", DateTime.Parse("10/03/2014"), "3632IK-7", car3Spec) { PriceBYB = 499000000 }; return new ExtendedList<ICar> { car1, car2, car3, car4 }; }
private GasolineCarSpecifications(GasolineCarSpecifications other) : base(other) { _engineCapacity = other._engineCapacity; _fuelConsumptionLp100Km = other._fuelConsumptionLp100Km; }