Introduction As we all know, software requirements always change, and we as developers need to make sure that these changes don’t break the existing code. For this reason, the SOLID principles were introduced in Object-Oriented design to ease this pr...

Markdown supported · ⌘↵ to post
Very good article!
I'm confused with "Strength Class Invariants" and "Weakens the precondition". With those examples it looks like a contradiction.
Carlos Andrés Sierra Betancur
Thanks for the article. One quick question though: isn’t the example in “Covariance of Return Types” violating the “Countervariance of Method Arguments”? The subtype can only receive strings, but the super type can also receive numbers.