Exemplo n.º 1
0
        public CashStrategy(string type, double rebate = 1, decimal moneyCondition = 0M, decimal moneyReturn = 0M)
        {
            switch (type)
            {
            case "Normal":
                this.cs = new CashNormal();
                break;

            case "Rebate":
                this.cs = new CashRebate(rebate);
                break;

            case "Ruduce":
                this.cs = new CashReduce(moneyCondition, moneyReturn);
                break;
            }
        }
Exemplo n.º 2
0
 public void setBehavior(CashSuper cs)
 {
     this._cs = cs;
 }