Created
July 5, 2020 11:12
-
-
Save theboreddev/0014da1a7faee6c37d0a8eeb13a54592 to your computer and use it in GitHub Desktop.
oldstrategy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final PriceCalculatorFactory factory = new PriceCalculatorFactory(); | |
final Item newItem = new Item(1L, new BigDecimal("12.99")); | |
final DeliveryPriceCalculator priceCalculator = factory.priceCalculatorFor(OldStylePlan.BASIC); | |
System.out.println("Delivery price is " + priceCalculator.priceFor(newItem)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment