Computer science 3.1 EXPERT
Which software design principle states that a class or module should be open to extension, but closed to modification?
75% of players answered correctly.
THE CORRECT ANSWER: The Open/Closed Principle
The Open/Closed principle, identified by the letter O in the architectural acronym SOLID, constitutes a fundamental rule of object-oriented software design. Originally formulated by Bertrand Meyer in the late 1980s, this recommendation establishes that a software entity must be open to functional extensions, but closed to modifications of its existing source code.Concretely, developers must design their class structures in such a way as to be able to add new functionalities without altering the behavior of components already proven and deployed. The systematic application of this principle generally relies on the use of abstraction, inheritance or polymorphism, as well as appropriate design patterns.By avoiding direct modification of existing code, we drastically reduce the risks of software regression and the appearance of new malfunctions within complex IT applications.