Пример #1
0
        public override uint GetPrice()
        {
            double basePrice = BookPrice.GetPrice();

#if DEBUG
            WriteLine("UsedBookSale : GetPrice");
#endif
            var price = basePrice * (1 - DiscountRate);
            return((uint)price);
        }
Пример #2
0
        public override uint GetPrice()
        {
            // throw new NotImplementedException();
            var price = BookPrice.GetPrice();

#if DEBUG
            WriteLine("Yes24PointSale : GetPrice");
#endif
            // 포인트가 가격보다 작거나 같으면
            if (price >= Yes24Point)
            {
                return(price - Yes24Point);
            }
            else
            {
                throw new ArgumentException(message: "사용할 Yes24 포인트가 제품의 가격보다 크다.", paramName: nameof(Yes24Point));
            }
        }