public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { var material = this.GetMaterialType(materialType); AdjustableChair adjustableChair = new AdjustableChair(model, material, price, height, numberOfLegs); return adjustableChair; }
public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { if (!this.Chairs.Any(c => c.Model == model)) { IAdjustableChair chair = new AdjustableChair(model, GetMaterialType(materialType).ToString(), price, height, numberOfLegs); this.Chairs.Add(chair); return chair; } return null; }
public IAdjustableChair CreateAdjustableChair(string model, string materialType, decimal price, decimal height, int numberOfLegs) { MaterialType type = GetMaterialType(materialType); AdjustableChair createdAdjustableChair = new AdjustableChair(model, type, price, height, numberOfLegs); return createdAdjustableChair; }