I was reading a book about design patterns and the code was written as : example:
class Fan{ private IState State1; private IState State2; . . .