SOLID principle #2: Open-Closed
The Open-Closed principles
A software artifact should be open for extension but closed for modification.
The behaviour of a software should be easily extendible without having to modify the artifact. This is a principle that guides the design of classes and modules.
If component A should be protected from changes in component B, then component B should depend on component A. This way higher level components are protected from changes made in lower level component like a hierarchy.