You will create Cart class as a context class to get total price and add product. ◦ To implement Strategy pattern, depending on the country of shipping, the relevant customs duty is charged and the shipping cost of Europe Shopping, America Shopping increases. Large products (XL-size) have an additional charge. Create AmericaShopping and EuropeShopping concrete class. In the USA, the duty tax is 1% and the base delivery fee is $15. In America, an additional tax different from the customs tax is applied and this tax is 0.75%. Customs duty should be added to the item fee for each item. In Europe, the customs duty is 1.5% and the base delivery fee is £11. In America, $5 should be added to the shipping fee when each item is added. But if the added product size is XL, $10 should be added to the shipping fee. In Europe, this should only be done if the product size is XL.
You will create Cart class as a context class to get total price and add product.
◦ To implement Strategy pattern, depending on the country of shipping, the relevant customs
duty is charged and the shipping cost of Europe Shopping, America Shopping increases. Large
products (XL-size) have an additional charge. Create AmericaShopping and EuropeShopping
concrete class.
In the USA, the duty tax is 1% and the base delivery fee is $15. In America, an additional tax
different from the customs tax is applied and this tax is 0.75%. Customs duty should be added
to the item fee for each item.
In Europe, the customs duty is 1.5% and the base delivery fee is £11.
In America, $5 should be added to the shipping fee when each item is added. But if the added
product size is XL, $10 should be added to the shipping fee. In Europe, this should only be done
if the product size is XL.
Step by step
Solved in 2 steps with 1 images