Top "Liskov-substitution-principle" questions

For questions about the Liskov Substitution Principle (LSP) in object-oriented design, developed by Barbara Liskov and collected by Robert C. Martin as one of the SOLID principles.

What is an example of the Liskov Substitution Principle?

I have heard that the Liskov Substitution Principle (LSP) is a fundamental principle of object oriented design. What is it …

oop definition solid-principles design-principles liskov-substitution-principle
Can you explain Liskov Substitution Principle with a good C# example?

Can you explain Liskov Substitution Principle (The 'L' of SOLID) with a good C# example covering all aspects of the …

c# .net oop solid-principles liskov-substitution-principle
Why array implements IList?

See the definition of System.Array class public abstract class Array : IList, ... Theoretically, I should be able to write this …

c# arrays ilist liskov-substitution-principle
Can anyone provide an example of the Liskov Substitution Principle (LSP) using Vehicles?

The Liskov Substitution Principle states that a subtype should be substitutable for that type (without altering the correctness of the …

oop solid-principles liskov-substitution-principle
Is deriving square from rectangle a violation of Liskov's Substitution Principle?

I am new to design and learning the design principles. It says deriving square from rectangle is a classic example …

oop liskov-substitution-principle
Why doesn't Rust support trait object upcasting?

Given this code: trait Base { fn a(&self); fn b(&self); fn c(&self); fn d(&…

oop rust language-design liskov-substitution-principle
Any good examples of inheriting from a concrete class?

Background: As a Java programmer, I extensively inherit (rather: implement) from interfaces, and sometimes I design abstract base classes. However, …

java oop inheritance liskov-substitution-principle
Liskov substitution principle - no overriding/virtual methods?

My understanding of the Liskov substitution principle is that some property of the base class that is true or some …

design-principles solid-principles liskov-substitution-principle