1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
uysha [10]
3 years ago
12

Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volu

me 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)

import java.util.Scanner;

public class CalcPyramidVolume {

/* Your solution goes here */

public static void main (String [] args) {
System.out.println("Volume for 1.0, 1.0, 1.0 is: " + pyramidVolume(1.0, 1.0, 1.0));
return;
Physics
2 answers:
Maksim231197 [3]3 years ago
8 0

Answer:  Volume = 8/3

Explanation:

Let x represent the base length, base width and height  

Volume = 2x X 2x X 2x X 1/3 = 8x³/3

When x = 1.0

∴ Volume = 8(1.0)³/3 = 8/3

lara31 [8.8K]3 years ago
3 0

Answer:

Explanation:

Its not a good practice to write all the functions including main() in the same class.

But as you opted for this, the code goes here like this:

public class CalcPyramidVolume {

/* Your solution goes here */

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

{

double Volume,baseArea;

baseArea = baseLength * baseWidth;

Volume = baseArea * pyramidHeight * 1/3;

return Volume;

}

public static void main (String [] args) {

System.out.println("Volume for 1.0, 1.0, 1.0 is: " + pyramidVolume(1.0, 1.0, 1.0));

return;

}

}

And there is not caveat of integer division, as you are declaring all your variables of type double.

You might be interested in
Which of the following is not a way to make exercising on a cold day safer?
IRISSAK [1]

Answer:

D.

Explanation:

I think its D. because Tea during a cold workout isnt safe at all. Drinking tea while working out adds weight and you just simply dont need tea when working out.. Hope this helps man :)

4 0
3 years ago
Read 2 more answers
7. A neutral aluminum rod is at rest on a foam insulating base. A negatively charged balloon is brought near one end of the rod
WITCHER [35]

Answer:

If a negatively charged balloon is brought near one end of the rod but not in direct contact, then <u>the negative charges on the balloon repel the same amount of negative charges on the end of the rod that is close to the balloon</u>, and the positive charges stay at the balloon-side of the rod. The total charge of the rod is still zero, but the distribution of the charges are now non-uniform.

6 0
3 years ago
If the distance from a light source triples, how does light intensity change? The intensity will be 3x greater. The intensity wi
Tcecarenko [31]

Answer:

The intensity will be 1/9 as much.

Explanation:

The intensity of the light or any source is inversely related to the square of the distance.

I\alpha \frac{1}{r^{2} }

Now according to the question the distance is increased by three times than,

\frac{I_{2} }{I_{1} }=\frac{r_{1}^{2} }{r_{2}^{2} }

Therefore,

\frac{I_{2} }{I_{1} }=\frac{r_{1}^{2} }{(3r_{1})^{2} }\\\frac{I_{2} }{I_{1} }=\frac{1}{9} \\{I_{2}=\frac{1}{9}{I_{1} }

Therefore the intensity will become 1/9 times to the initial intensity.

3 0
3 years ago
A roller coaster pushes a 25 kg person upward with a force of 300 N. What is the acceleration?
vlada-n [284]
300N/25 kg= divide them for the answer
8 0
3 years ago
Earlier we discussed the concept of isostasy, where lower density rocks rise higher than higher density rocks. How is the variat
Elena L [17]

The variation of water depth at spreading centers (ridges) controlled by isostasy  as convective cooling cools the rocks much more effectively the than heat conduction.

<h3>What is convective heat transfer?</h3>

When heat transfer takes place between the two fluids in direct or indirect contact.

The lithosphere cools when it moves away from the ridge axis by sea floor spreading. The cooler rocks have low density, so the sea floor gets deeper as the lithosphere gets more dense.

Thus, the convective cooling cools the rocks much more effectively the than heat conduction.

Learn more about convective heat transfer

brainly.com/question/10219972

#SPJ1

4 0
2 years ago
Other questions:
  • A soccer ball of diameter 22.6cm and mass 426g rolls up a hill without slipping, reaching a maximum height of 5m above the base
    14·1 answer
  • You have a pure (24-karat) gold ring with mass Gold has an atomic mass of and an atomic number of 79. (a) How many protons are i
    14·1 answer
  • An arctic fox has thick, dense fur in the winter and much shorter fur in the summer. How does this help the fox maintain homeost
    14·2 answers
  • Half life of a given sample of radium is 22 years the sample will reduce to 25% of its original value after
    8·1 answer
  • A tuning fork produced four beats per second with a second, 270-Hz tuning fork. What are the two possible frequencies of the fir
    11·1 answer
  • If the mass of Earth increased, with no change in radius, your weight<br> would
    12·1 answer
  • What does the law of conservation of energy state? *
    5·2 answers
  • How can I solve the following?
    14·1 answer
  • What are the 27 vawels
    15·2 answers
  • Cool air tends to...
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!