Podcast
Questions and Answers
According to the open–closed principle, software entities should be open for extension, but closed for modification. This means:
According to the open–closed principle, software entities should be open for extension, but closed for modification. This means:
- Allowing behavior extension without modifying source code (correct)
- Disallowing any form of extension
- Allowing modification of source code for behavior extension
- Disallowing source code modification
Which technique is used to implement the open–closed principle?
Which technique is used to implement the open–closed principle?
- Removal of all extension points
- Direct modification of source code
- Complete restructuring of software entities
- Generalizations such as inheritance or delegate functions (correct)
In the context of the open–closed principle, a module is considered open if:
In the context of the open–closed principle, a module is considered open if:
- It contains a stable description
- It is still available for extension (correct)
- It is available for use by other modules
- It requires changes to dependent programs
The open–closed principle is part of which set of object-oriented design principles?
The open–closed principle is part of which set of object-oriented design principles?
During the time Bertrand Meyer introduced the open–closed principle, what was the implication of adding fields or functions to a library?
During the time Bertrand Meyer introduced the open–closed principle, what was the implication of adding fields or functions to a library?