Question: 1 2 3 4 5 6 7 public class Module4 public static void main(String[] args) { System.out.println(calculateRectangularArea(3, 4)); // should be 12.0 System.out.println(calculateRectangularPerimeter(3, 4)); //should

![static void main(String[] args) { System.out.println(calculateRectangularArea(3, 4)); // should be 12.0 System.out.println(calculateRectangularPerimeter(3,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3a1eb48dff_73066f3a1eadedaa.jpg)

1 2 3 4 5 6 7 public class Module4 public static void main(String[] args) { System.out.println(calculateRectangularArea(3, 4)); // should be 12.0 System.out.println(calculateRectangularPerimeter(3, 4)); //should be 14.0 System.out.println(calculateBoxVolume (3, 4, 5)); //should be 60.0 // System.out.println(calculateCircleArea(3)); //uncomment when the code ready -- should be 28.259999999999998 // System.out.println(calculateSphereVolume (3)); //uncomment when the code ready -- should be 113.03999999999999 // System.out.println(calculateEmployee Compensation (15)); //uncomment when the code ready -- should be 150.0 // System.out.println(calculate Employee CompensationBonus (15)); //uncomment when the code ready -- should be 250.0 // System.out.println(calculate Insurance Quote (20) ); //uncomment when the code ready -- should be 950.0 } 9 10 11 12 13 14 15 16 17 18 public static double calculateRectangularArea ( double width, double length) { //TODO: Your code here. You need to return the area of the rectangular given the width and length //Formula: area = width*length return 0.0; 1/ temporary return 0 } 19 | public static double calculateRectangularPerimeter (double width, double length) { //TODO: Your code here. You need to return the perimeter of the rectangular given the width and length //Formula: perimeter = 2* (width + length) return 0.0; // temporary return 0 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 public static double calculateBoxVolume (double width, double length, double height) { //TODO: Your code here. You need to return the volume of the box given the width, length, and height //Formula: volume = width*length*height return 0.0; // temporary return 0 } //TODO: Write a static method called "calculateCircleArea" to calculate area of a circle only given radius //Assume pi = 3.14 //Formula: area = pi*(radius^2) ^2 does not work in Java, think about a way to represent it so Java can understand without using external tools //TODO: Write a static method called "calculateSphereVolume" to calculate volume of a sphere only given radius //Assume pi = 3.14 //Formula: volume = 4/3*pi*(radius^3) -- 43 does not work in Java //TODO: Write a static method called "calculateEmployee Compensation" to calculate an employee compensation only given his/her number of hours //Assume that the company is paying $10.0 an hour 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 //TODO: The company of previous method has decide to give each employee $100.0 bonus //Write a static method called "calculate Employee CompensationBonus" to calculate the total compensation only given his/her number of hours //Use previous "calculateEmployeeCompensation" method //TODO: Write a static method called "calculate Insurance Quote" to calculate auto insurance for a person given his/her age (need to be greater than 15) //Assume that the company only sell insurance for people older than 15 //Assume that the base quote is $1000.0 / /Assume that each year older than 15, the person receive $10 discount }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
