Open/Closed (OCP)–SOLID Design Principle
Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. By open for extension, this principle means the ability for an entity to be adapted to meet the changing needs of an application. By closed for modification, this principle means that the…