public CarFacade(ICarAccessories accessories, ICarBody body, ICarEngine engine, ICarModel model) { this.accessories = accessories; this.body = body; this.engine = engine; this.model = model; }
public double GetMaxSpeed(IEngine engine, ICarBody body) { var rand = new Random(); double maxSpeed = rand.Next(100, 450); //here the maximum car speed is somehow calculated taking into account the parameters of the body and engine return(maxSpeed); }
public double GetConsumption(IEngine engine, ICarBody body) { var rand = new Random(); double consumption = rand.Next(50, 150); //here the fuel consumption is somehow calculated taking into account the parameters of the body and engine return(consumption); }
public Car(IEngine engine, ICarBody body, int carCost, string model, int ID) { СarBody = body; СarEngine = engine; CarCost = carCost; CarModel = model; CarID = ID; ConsumptionOfFuel = GetConsumption(engine, body); MaxSpeed = GetMaxSpeed(engine, body); }
private Car(ICarBody carBody, IEngine engine, IVehicleInterior interior) { CarBody = carBody; Engine = engine; Interior = interior; }
public Car(IEngine engine, ICarBody carbody) { this.iengine = engine; this.icarbody = carbody; }