Replaced 'if-then-else' with Java switch on strings: do not forget
'break.'