Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Discover in-depth answers to your questions from a wide network of experts on our user-friendly Q&A platform. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

1) Goal: Understand how to use switch statements to handle multiple conditions.
Assignment: Write a full program with class name Calculator to solve a calculator problem that prompts the user for 2 (double) numbers and an operator (char) and outputs the result. as a Java. Code

2) Goal: Learn to write switch-case statements.
Assignment: In a new eco-friendly transportation system, vehicles are categorized by their emission levels to encourage lower emissions. The categories are as follows:
• 0: Electric
• 1: Hybrid
• 2-4: Gasoline Low Emission
• 5: Gasoline
• 6-9: Diesel
Given an int variable vehicleType, write a switch statement that prints out the emission category based on vehicleType.
For example, if vehicleType is 2, print "Gasoline Low Emission".

Show the codes for both questions

Class name: Exercise
( if needed)