Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3.5.3 Method definition: Volume of a pyramid ACTIVITY Define a method pyramidVolume with double parameters baselength, baseWidth, and pyramidHeight, that returns as a double the
3.5.3 Method definition: Volume of a pyramid ACTIVITY Define a method pyramidVolume with double parameters baselength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. Relevant geometry equations Volume base area x height x 1/3 Base area base length x base width (Watch out for integer division) 1 import java. util. Scanner; 1 test public class CalcPyramidVolume f 4 double pyramidvolume (double baselength, double basewidth, double pyramidHeight) public static void pyramidVolume ((baseLength . basewidth) . pyramidHeight) / 3; All tests passed 7 8 Your solution goes here 1e public static void main (String [] args) CalcPyramidvolume volumeCalculator new CalcPyramidVolume(); System.out.printin("Volume for 1.e, 1.8, 1.8 is: "volumeCalculator.pyramidvolume(1.e, 1.e, 1.e)); 12 13 14 Run Failed to compile CalcPyramidVol ume.java:7 error: illegal start of expression public static void pyramidVolume = ((baseLength * basewidth) * pyrami dHeight) / 3; CalcPyramidvolume.java:7: error: ' expected public static void pyramidVolume ((baseLength baseWidth) pyramidHeight) 3: O Type here to search 915 PM 9/23/20
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started