Have you ever heard SOLID? 🤔 Let's look at 'O : Open-Closed Principle' of it.
By Book Definition:
Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.
But what does it actually mean? 🤔Let's first see the example where OCP is violated:
class NotificationService {
...
iamgautam.hashnode.dev3 min read