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);
            }
        }
Example #2
0
 public Customer(string name, TypeCustomer type)
 {
     this.Name = name;
     this.typeCustomer = type;
 }