Is this a violation of the Liskov Substitution Principle?
- by Paul T Davies
Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure the option to close a started ProjectTask is never available, but some safeguards are present in the domain:
public class Task
{
public Status…