Rewrite the selection structure (marked with the rectangle)…
Rewrite the selection structure (marked with the rectangle) in the Java program at the left side, using a SWITCH. You don’t need to type the entire program in the answer box. In the textbox below, just rewrite the rectangled part into a SWITCH block. The SWITCH block should do the exactly same job like the given IF-ELSE codes here. If you declare any variables, name convention is still required. Indentation and spacing are suggested (not required) for a better readability of your codes.
Read Details