Esempio n. 1
0
        public AbstractItem Apply(AbstractItem item)
        {
            switch (item.Category)
            {
                case Category.BOOK:
                    break;
                case Category.FOOD:
                    break;
                case Category.MEDICAL:
                    break;
                default:
                    item = new TaxedItem(item);
                    break;
            }

             item = item.IsImport? item = new ImportedItem(item) :item;
            
            return item;
        }
Esempio n. 2
0
 public TaxedItem(AbstractItem item)
     : base(item.Category, item.IsImport, item.OriginalPrice)
 {
     this.decoratorItem = item;
 }