Skip to content

Conversation

DavidVujic
Copy link
Contributor

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. I think they should accept parameters on instantiation. Lot's of code can be deleted: the switch clause and all setters for width/height/length. Less code!

@DavidVujic DavidVujic changed the title refactor: Liskov Substitution - width/height/length as constructor params Liskov Substitution (SOLID section) - width/height/length as constructor params Jan 30, 2017
@ryanmcdermott ryanmcdermott merged commit ac6a51d into ryanmcdermott:master Jan 30, 2017
@ryanmcdermott
Copy link
Owner

Thanks David this has been a long-standing issue and I'm really glad to see it resolved, great work!

@DavidVujic DavidVujic deleted the liskov-substitution branch January 31, 2017 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants