Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liskov Substitution Principle (LSP) #66

Closed
wants to merge 7 commits into from

Conversation

peter-gribanov
Copy link
Contributor

@peter-gribanov peter-gribanov commented Sep 5, 2017

Fix for #37, #46

Correct Good example of LSP and add one more example.

@peter-gribanov
Copy link
Contributor Author

@TomasVotruba What do you think about this example? Is it not too complicated?

I want to add two more examples later with a violation of LSP so that readers can see different methods of breach of contract.

@TomasVotruba
Copy link
Contributor

TomasVotruba commented Sep 5, 2017

I got lost in changes and the original example as well. I don't have more free time to check this.

@jupeter needs to review

@peter-gribanov
Copy link
Contributor Author

@TomasVotruba You can see changes in split mode. Perhaps this will be easier to read.

@TomasVotruba
Copy link
Contributor

TomasVotruba commented Sep 5, 2017

Still too complicated for me

I think it can be as simple as 15 lines of code (after few secs of Googling): https://www.tomdalling.com/blog/software-design/solid-class-design-the-liskov-substitution-principle/

@peter-gribanov
Copy link
Contributor Author

I understood you. I will make an easier example.

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