AlgoMaster Logo

Exercise: Open-Closed Principle

Last Updated: February 16, 2026

Try implementing the below code exercises to reinforce your understanding. Your goal is to implement the classes below so that they produce the expected output.

Exercise 1: ShippingCostCalculator

Exercise 2: NotificationService