Implemented switch statement