April 2017
Intermediate to advanced
564 pages
24h 7m
English
This principle simply means that a class should not allow modification in its code due to a change in functionality. It should only allow you to extend the functionality in some form, for example, by inheritance.
Once again, this principle is satisfied in our decorator example, where our persistence decorator (derived) classes implement the abstract base class to extend (and add up) the functionality instead of modifying the existing class.
Read now
Unlock full access