You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The good example of the Liskov Substitution principle in the SOLID section is doing a switchcase to set the width/height/length of the shapes. Perhaps they should accept parameters on instantiation (constructor)? The switch (or setters for width/height/length) would not be necessary if so.
The good example of the Liskov Substitution principle in the SOLID section is doing a
switch
case
to set the width/height/length of the shapes. Perhaps they should accept parameters on instantiation (constructor)? The switch (or setters for width/height/length) would not be necessary if so.Here's an example, also rewritten as functions (even less syntax):
https://github.com/DavidVujic/clean-code-javascript#liskov-substitution-principle-lsp
The text was updated successfully, but these errors were encountered: