Code Editor Ready
Output
Console
Console initialized... Ready for Project 5: Menu-Based Calculator > Test your code with the "Check My Code" button > When it works, the Complete button will activate!
Put methods to work in a real app! Create a calculator that shows a menu, reads the user's choice, calls the right method, and prints the result.
Create a program that:
1. Add 2. Subtract 3. Multiply 4. DivideResult: Xstatic double add(double a, double b)System.out.println()sc.nextInt()sc.nextDouble()switch to call the right methodSystem.out.println("Result: " + result);
Console initialized... Ready for Project 5: Menu-Based Calculator > Test your code with the "Check My Code" button > When it works, the Complete button will activate!