Hey. You could try and use a enum. Here's what I would try and do;
Instead of posting code I saw this thread on spoonfeeding and decided not to spoonfeed.