intermediateSOLID Principles in LLD

LSP: Give a classic violation example (Rectangle-Square problem) and how to fix it.

Tests whether you know the textbook example of a subtype that technically extends a class but breaks its behavioral contract.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

LSP: Give a classic violation example (Rectangle-Square problem) and how to fix it.

Next Step

Continue to What is a sequence diagram? Draw one for a user logging into an application.← Back to all Design Patterns & LLD questions