Confusion with Factory pattern regarding Liskov’s Substitution Principle, code maintainability and Unit Testing?
I have a confusion regarding Factory Pattern there are basically two ways You can implement that.
Confusion with Factory pattern regarding Liskov’s Substitution Principle, code maintainability and Unit Testing?
I have a confusion regarding Factory Pattern there are basically two ways You can implement that.
Confusion with Factory pattern regarding Liskov’s Substitution Principle, code maintainability and Unit Testing?
I have a confusion regarding Factory Pattern there are basically two ways You can implement that.
Exceptions and the Liskov Substitution Principle
Consider the following scenario.
Is throwing an error in unpredictable subclass-specific circumstances a violation of LSP?
Let’s say I wanted to create a Java List<String>
(see spec) implementation that uses a complex subsystem, such as a database or file system, for its store so that it acts as a persistent collection rather than an in-memory one.
Is throwing an error in unpredictable subclass-specific circumstances a violation of LSP?
Let’s say I wanted to create a Java List<String>
(see spec) implementation that uses a complex subsystem, such as a database or file system, for its store so that it acts as a persistent collection rather than an in-memory one.
Liskov principle: violation by type-hinting
According to the Liskov principle, a construction like the one below is invalid, as it strengthens a pre-condition.
Liskov principle: violation by type-hinting
According to the Liskov principle, a construction like the one below is invalid, as it strengthens a pre-condition.
Liskov principle: violation by type-hinting
According to the Liskov principle, a construction like the one below is invalid, as it strengthens a pre-condition.
Liskov substitution principle with abstract parent class
Does Liskov substitution principle apply to inheritance hierarchies where the parent is an abstract class the same way if the parent is a concrete class?