Re-write following if-else-if statements as Switch statement.Your final code should result in the same output as the originalcode below.
if (selection == 10)
System.out.println(\"You selected 10.\");
else if (selection == 20)
System.out.println(\"You selected 20.\");
else if (selection == 30)
System.out.println(\"You selected 30.\");
else if (selection == 40)
System.out.println(\"You selected 40.\");
else System.out.println(\"Not good with numbers, eh?\");
2.
Write a Constructor for the TrafficLight class that setsstopLight value to “red”, waitLight to “yellow” and goLight to“green”?