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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }