Def: Software entities (Classes, Modules, Functions, etc.) should be open for extension but closed for modification It is one of the oldest principles of Object Oriented Design. I will not bore you with the history since you can find countless articles out on the internet. The open/closed principle states as per its definition; that is,…