Computer Science, asked by sangwandeepa06, 9 days ago

Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation.

Answers

Answered by jebarajponsingh
0

Answer:

PyramidVolume return type is void. Change return type to double as below:

public static double pyramidVolume (double baseLength, double baseWidth, double pyramidHeight) {

double pyramidVolume = ((baseLength *baseWidth) pyramidHeight) / 3;

return pyramidVolume;}

My Request:-

Make me Brainlist for answering correctly.

Similar questions