In what ways can violating the Liskov Substitution Principle lead to issues in a polymorphic system?

  • It simplifies code
  • It enhances code reusability
  • It improves system performance
  • It may break the system
Violating the Liskov Substitution Principle (LSP) in a polymorphic system can lead to unexpected behavior and system issues. LSP states that subtypes must be substitutable for their base types without altering the desirable properties of the program. Violations can result in runtime errors or unexpected behavior, undermining the correctness and stability of the system.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *