Open to extension, closed to modification
A discount system requires editing an existing method every time a new discount type is added.
Which principle does that violate, and what would satisfy it?
A discount system requires editing an existing method every time a new discount type is added.
Which principle does that violate, and what would satisfy it?