Refactoring to State Pattern
Refactoring is a process of changing a software in a way that doesn’t alter the external behavior of code and yet improves its internal structure. In this post I am trying to explain how one of the bad code smell can be treated using State Patterns.