public Customer CreateCustomer(TypeCustomer customerType) { switch (customerType) { case TypeCustomer.DiscountCustomer: return(new DiscountCustomer()); case TypeCustomer.LoyalCustomer: return(new LoyalCustomer()); case TypeCustomer.WonderingCustomer: return(new WonderingCustomer()); default: return(null); } }
public Customer(string name, TypeCustomer type) { this.Name = name; this.typeCustomer = type; }