# Open/Closed Principle The Open/Closed Principle is the "O" in the [[solid principles|SOLID]] acronym. In short, this principle says classes should be open for extension but closed for modification. In other words, you should be able to add new behavior—like new payment methods—without rewriting existing logic. Abstractions and subclasses make this possible.