public static ITotalPrice CreateUserTotalPrice(String key, ITotalPrice totalPriceObject)
 {
     if (key == "StoreOwner")
     {
         return(new StoreOwnerTotalPrice(totalPriceObject));
     }
     else if (key == "NormalUser")
     {
         return(new NormalUserTotalPrice(totalPriceObject));
     }
     else
     {
         throw new NotSupportedException("btal habd");
     }
 }
Esempio n. 2
0
 public StoreOwnerTotalPrice(ITotalPrice totalPriceObject) : base(totalPriceObject)
 {
     base.GlobalDiscountRate += 0.15;
 }
 public NormalUserTotalPrice(ITotalPrice totalPriceObject) : base(totalPriceObject)
 {
     base.GlobalDiscountRate += 0.0;
 }