Esempio n. 1
0
        public CashContextFactory(string type)
        {
            switch (type)
            {
            case "正常收費":
                cs = new CashNormal();
                break;

            case "滿300返100":
                cs = new CashReturn("300", "100");
                break;

            case "打8折":
                cs = new CashRebate("0.8");
                break;

            default:
                break;
            }
        }
 public CashContext(CashSuper cs)
 {
     this.cs = cs;
 }