TtitleFactory takes the responsibility of creating titles. It decides which child of the Title to create according to the "type" parameter and creates the title with the parameters it receives from Varargs.
- IPriceStrategy interface was created, and its implementation; PercantageDiscount, AbsoluteDiscountStrategy, NormalStrategy were created.
- PriceStrategyFactory decides which PriceStrategy will be created based on time period.
- When Rental is created, Rental receives one strategy from PriceStrategyFactory. Rental uses this strategy to calculate price in its getPrice
back to Quick Links
back to Quick Links
back to Quick Links
back to Quick Links
back to Quick Links
- Taylan Taşkın
- Ahmet Tarık Duyar