//Clothing Constructor public Clothing(string name, Type itemType, decimal cost, int stockLevel, int restockLevel, int size, string colour, clothingType style) : base(name, itemType, cost, stockLevel, restockLevel) { this.size = size; this.colour = colour; this.style = style; }
public static clothing Create(clothingType type, float[] parameters) { clothing clothing = null; switch (type) { case clothingType.pants: clothing = new pants(parameters[0]); break; case clothingType.sweater: clothing = new sweater(parameters[0], parameters[1]); break; case clothingType.socks: clothing = new socks(parameters[0], parameters[1], parameters[2]); break; } return(clothing); }