change promotype to field
extract doCalculate method
update code
update code
add calculateBoughtItem method
add a abstract mothed
new DiscountPromotion Class
update PromotionServer class
make DiscountPromotion exteds PromotionType
new BuyTwoGetOneFreePromotion class
make BuyTwoGetOneFreePromotion extends PromotionType
new SecondHalfPricePromotion class
make SecondhalfPricePromotion extends PromotionType
change String to PromotionType
replace type code with state end
update code
fix DiscountPromotion code
fix code
move promotype to promotionType
delete useless code