What is your problem in using switch?
Does it compile? Is there an error?

If you need help, ask a question besides the implied "give me a working solution"