Question: Given the following method, what do we need to fix? public static String getPerformance (char grade) { switch (grade) { case 'A': return Excellent; break;

Given the following method, what do we need to fix? public static String getPerformance (char grade) { switch (grade) { case 'A': return "Excellent"; break; case 'B': return "Good"; break; case 'c': return "Mediocre"; break; case 'D': return "Weak"; break; case 'F': return "Bad"; break; ) Add a local boolean variable definition. Remove all the break statements. Remove all the break statements and add a return statement before the end of method. Remove the switch statement and use and if statement. You need to write a method that calculates the volume for a shape, which depends on the shape's length, width, and height. What should be the parameter variables and their data types for this method? double width, double length, double height double length double length, double height double length, double height, String depth
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
