How do I do this in Java language? CSCI 200: Software Design and Programming I home >User-defined method basicsE zyBooks catalog2 Help/FFCHALLENGE6.1.3: Method definition: Volume of a...

How do I do this in Java language?ty Col x<br>I Chapter 6 Participation Activitie x<br>zy Section 6.1-CSCI 200: Software<br>ybooks.com/zybook/LADELTACSCI1200KleinpeterSpring2022/chapter/6/section/1<br>brary > CSCI 200: Software Design and Programming I home ><br>User-defined method basics<br>E zyBooks catalog<br>2 Help/FF<br>CHALLENGE<br>6.1.3: Method definition: Volume of a pyramid.<br>АCTIVITY<br>Define a method pyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a<br>double the volume of a pyramid with a rectangular base. Relevant geometry equations:<br>Volume = base area x height x 1/3<br>Base area = base length x base width.<br>(Watch out for integer division).<br>%3D<br>371670.2055702.gxazoy7<br>1 import java.util.Scanner;<br>3 public class CalcPyramidVolume {<br>1 test<br>passed<br>4<br>5.<br>V* Your solution goes here<br>6<br>All tests<br>public static void main (String [] args) {<br>Scanner scnr = new Scanner (System.in);<br>double userLength;<br>double userWidth;<br>double userHeight;<br>7.<br>passed<br>8.<br>9<br>6.<br>10<br>11<br>12<br>13<br>userLength = scnr.nextDouble();<br>userwidth = scnr.nextDouble();<br>userHeight = scnr.nextDouble();<br>%3D<br>14<br>15<br>16<br>17<br>System.out.println(

Extracted text: ty Col x I Chapter 6 Participation Activitie x zy Section 6.1-CSCI 200: Software ybooks.com/zybook/LADELTACSCI1200KleinpeterSpring2022/chapter/6/section/1 brary > CSCI 200: Software Design and Programming I home > User-defined method basics E zyBooks catalog 2 Help/FF CHALLENGE 6.1.3: Method definition: Volume of a pyramid. АCTIVITY Define a method pyramidVolume with double data type 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). %3D 371670.2055702.gxazoy7 1 import java.util.Scanner; 3 public class CalcPyramidVolume { 1 test passed 4 5. V* Your solution goes here 6 All tests public static void main (String [] args) { Scanner scnr = new Scanner (System.in); double userLength; double userWidth; double userHeight; 7. passed 8. 9 6. 10 11 12 13 userLength = scnr.nextDouble(); userwidth = scnr.nextDouble(); userHeight = scnr.nextDouble(); %3D 14 15 16 17 System.out.println("Volume: " + pyramidvolume(userLength, userwidth, userHeight)); Run View your last submission Y hp 23 % & 3. 4. 6 7 8.
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here