Open Closed Principle
Everything on SkillVeris tagged Open Closed Principle — collected across the glossary, study notes, blog, and cheat sheets.
8 resources across 1 library
Interview Questions(8)
What is Polymorphism in OOP?
Polymorphism is the object-oriented principle that lets objects of different classes respond to the same method call in their own class-specific way.
What is the Factory Pattern?
The Factory pattern delegates object creation to a dedicated method or class instead of calling a constructor directly, so callers depend on an interface rathe…
What is the Strategy Pattern?
The Strategy pattern defines a family of interchangeable algorithms, encapsulates each one behind a common interface, and lets the client swap the algorithm at…
What is the Open-Closed Principle?
The Open-Closed Principle (OCP) states that software entities — classes, modules, functions — should be open for extension but closed for modification, meaning…
What is the Decorator Pattern?
The Decorator pattern attaches additional responsibilities to an object dynamically by wrapping it in one or more decorator objects that share the same interfa…
Explain SOLID Principles with Real-World Examples
SOLID is a set of five object-oriented design principles — Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inver…
What is Replace Conditional with Polymorphism?
Replace Conditional with Polymorphism is the refactoring that removes a branching statement — usually a switch or if/else chain keyed on an object’s type — by…
How Does the Visitor Pattern Use Double Dispatch?
The Visitor pattern lets you add new operations over a fixed class hierarchy without modifying the hierarchy itself, by defining an accept(Visitor) method on e…