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
A sprinter set a high school record in track and field, running 200.0 m in 20.6 s . what is the average speed of the sprinter in
Paraphin [41]

Answer : The average speed of the sprinter is, 34.95 Km/hr

Solution :

Average velocity : It is defined as the distance traveled by the time taken.

Formula used for average velocity :

v_{av}=\frac{d}{t}

where,

v_{av} = average velocity

d = distance traveled = 200 m

t = time taken = 20.6 s

Now put all the given values in the above formula, we get the average velocity of the sprinter.

v_{av}=\frac{200m}{20.6s}\times \frac{3600}{1000}=34.95Km/hr

conversion :

(1 Km = 1000m)

(1 hr = 3600 s)

Therefore, the average speed of the sprinter is, 34.95 Km/hr

8 0
3 years ago
Read 2 more answers
Steel is made of atoms of iron and carbon. Would iron and carbon form metallic bonds? Explain your answer choice.
Hatshy [7]

Sample Response: "No, steel and carbon would not form metallic bonds because metallic bonds only form between metals. Iron is a metal, but carbon is not."

7 0
3 years ago
Read 2 more answers
Which elements do not usually interact with other elements?
d1i1m1o1n [39]
Noble gasses ( insert gases)
7 0
3 years ago
Read 2 more answers
Block A has a mass of 0.5kg, and block B has a mass of 2kg. Block is is released at a height of 0.75 meters above B. The coeffic
VikaD [51]

Answer:

0.075 m

Explanation:

The picture of the problem is missing: find it in attachment.

At first, block A is released at a distance of

h = 0.75 m

above block B. According to the law of conservation of energy, its initial potential energy is converted into kinetic energy, so we can write:

m_Agh=\frac{1}{2}m_Av_A^2

where

g=9.8 m/s^2 is the acceleration due to gravity

m_A=0.5 kg is the mass of the block

v_A is the speed of the block A just before touching block B

Solving for the speed,

v_A=\sqrt{2gh}=\sqrt{2(9.8)(0.75)}=3.83 m/s

Then, block A collides with block B. The coefficient of restitution in the collision is given by:

e=\frac{v'_B-v'_A}{v_A-v_B}

where:

e = 0.7 is the coefficient of restitution in this case

v_B' is the final velocity of block B

v_A' is the final velocity of block A

v_A=3.83 m/s

v_B=0 is the initial velocity of block B

Solving,

v_B'-v_A'=e(v_A-v_B)=0.7(3.83)=2.68 m/s

Re-arranging it,

v_A'=v_B'-2.68 (1)

Also, the total momentum must be conserved, so we can write:

m_A v_A + m_B v_B = m_A v'_A + m_B v'_B

where

m_B=2 kg

And substituting (1) and all the other values,

m_A v_A = m_A (v_B'-2.68) + m_B v_B'\\v_B' = \frac{m_A v_A +2.68 m_A}{m_A + m_B}=1.30 m/s

This is the velocity of block B after the collision. Then, its kinetic energy is converted into elastic potential energy of the spring when it comes to rest, according to

\frac{1}{2}m_B v_B'^2 = \frac{1}{2}kx^2

where

k = 600 N/m is the spring constant

x is the compression of the spring

And solving for x,

x=\sqrt{\frac{mv^2}{k}}=\sqrt{\frac{(2)(1.30)^2}{600}}=0.075 m

5 0
3 years ago
What best describes the significance of albert einstein's famous equation famous equations e=mc2?
babunello [35]
The absolute simplest way to explain E=MC^2 is: a lot of energy from a little mass.
8 0
3 years ago
Other questions:
  • A water pipe tapers down from an initial radius of R1 = 0.21 m to a final radius of R2 = 0.11 m. The water flows at a velocity v
    7·1 answer
  • A student of weight 652 N rides a steadily rotating Ferris wheel (the student sits upright). At the highest point, the magnitude
    15·1 answer
  • When an electron moves 2.5 m in the direction of an electric field, the change in electrical potential energy of the electron is
    5·1 answer
  • The concrete slab of a basement is 11 m long, 8 m wide, and 0.20 m thick. During the winter, temperatures are nominally 17°C and
    8·1 answer
  • What function do you think underground hyphae perform?
    8·2 answers
  • The gravitional energy of an object is always measured realative to the ?
    9·2 answers
  • Approximately what percentage of Earth’s radius is represented by the crust?
    7·1 answer
  • Two charges q1 and q2, that are distance d apart , repel each other with a force of 6.40 N. what would be the force between two
    8·1 answer
  • Giving brainliest someone help pls
    10·2 answers
  • This activity asks you to sort items according to the most appropriate method for viewing. For each of the following items, indi
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!