Working with if, else if, and else statement in IfStatement class