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;
        }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }