There needs to be a break statement at the end of each case statement, otherwise the code falls through to the code in the next case.

Having a loop makes no sense if the results of previous...