Replace if() with switch() statement and control encoded message
Order Main class