This image is taken from [Applying Domain-Driven Design and Patterns: With Examples in C# and .NET](http://rads.stackoverflow.com/amzn/click/0321268202)

![enter image description here](https://i.stack.imgur.com/UCMr1.png)

This is the class diagram for the **[State Pattern](http://en.wikipedia.org/wiki/State_pattern)** where a `SalesOrder` can have different states during its life time. Only certain transitions are allowed between the different states.

Now the `OrderState` class is an `abstract` class and all its methods are inherited to its subclasses. If we consider the subclass `Cancelled` which is a final state that doesn't allow any transitions to any other states, we'll have to `override` all its methods in this class to throw exceptions.

Now doesn't that violate Liskov's substitution principle since a sublcass shouldn't alter the behavior of the parent? Does changing the abstract class into an interface fixes this?  

How can this be fixed?