Question: PLEASE RESPOND WITH JAVA CODE NOT C++ OR ANY OTHER LANGUAGE!! Key statement below : Rewrite the JAVA program so that it works correctly. Key

PLEASE RESPOND WITH JAVA CODE NOT C++ OR ANY OTHER LANGUAGE!!

Key statement below : Rewrite the JAVA program so that it works correctly.

PLEASE RESPOND WITH JAVA CODE NOT C++ OR ANY OTHER LANGUAGE!! Keystatement below : Rewrite the JAVA program so that it works correctly.

Key statement below : Rewrite the JAVA program so that it works correctly. 5. The following program is designed to find the area of a rectangle, the area of a circle, or the volume of a cylinder. However, (a) the statements are in the incorrect order; (b) the method calls are incorrect; (c) the logical expres- sion in the while loop is incorrect; and (d) method definitions are incorrect. Rewrite the program so that it works correctly. Your program must be properly indented. (Note that the program is menu driven and allows the user to run the program as long as the user wishes.) import java.util.; public class Ch7_PrExercises static Scanner console - new Scanner (System.in); public static void main(String[] args) double radius; double height; System.out.println("This program can calculate" + "the area of a rectangle, the area" + "of a circle, or volume of a cylinder."); System.out.println("To run the program enter: "); System.out.println("1: To find the area of rectangle."); System.out.println("2: To find the area of a circle."); System.out.println("To run the program enter: "); System.out.println("2: To find the area of a circle."); System.out.println("1: To find the area of rectangle."); System.out.println("3. To find the volume of a cylinder."); System.out.println("-1: To terminate the program."); choice = console.nextInt(); System.out.println(); ) public static double rectangle (double 1, double w) { return 1. r; public static double circle (double r) { return Math.PI * r * w; ) public static double cylinder (double br, double h) return Math.PI. ER . DR. 1; > )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!