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 bullet is fired horizontally from a handgun at a target 100.0 m away. If the initial speed of the bullet as it leaves the gun
Lera25 [3.4K]

Answer:

The distance is 0.53 m.

Explanation:

Given that,

Target distance = 100.0 m

Speed of bullet = 300 m/s

We need to calculate the total time

Using formula of time

t=\dfrac{d}{v}

Put the value into the formula

t=\dfrac{100.0}{300}

t=0.33\ sec

Now, consider vertical motion of bullet.

Initial velocity of bullet in vertical direction = 0 m/s

We need to calculate the vertically distance

Using equation of motion

s=ut+\dfrac{1}{2}gt^2

Put the value in the equation

s=0+\dfrac{1}{2}\times9.8\times(0.33)^2

s=0.53\ m

Hence, The distance is 0.53 m.

5 0
3 years ago
A turntable with a moment of inertia of 7.2 × − ⋅ rotates freely with an angular speed of 6.5 ⁄ . Riding on the rim of the turnt
irina1246 [14]

Answer:

turntable with a moment of inertia of 7.2 × − ⋅ rotates freely with an angular speed of 6.5 ⁄ . Riding on the rim of the turntable, 2 from the center, is a hamster. When the hamster walks to the center of the turntable, the angular speed of the turntable becomes ⁄. What is the mass of hamster?

Explanation:

6 0
3 years ago
A process with a negative change in enthalpy and a negative change in entropy will generally be:________
valentina_108 [34]

A process with a negative change in enthalpy and a negative change in entropy will generally be: <u>spontaneous</u>.

<h3>Gibbs free energy:</h3>

Since the Gibbs free energy is a parameter that tells us whether a chemical reaction is spontaneous (Gibbs free energy less than 0) or nonspontaneous (Gibbs free energy greater than 0) in this situation, we can describe it mathematically as:

                                      ΔG = ΔH - TΔS

Therefore, any process with a negative change in enthalpy and a positive change in entropy will be spontaneous. If the enthalpy and the entropy are both negative, the subtraction becomes always negative, for which the Gibbs free energy is also negative.

One of the most crucial thermodynamic functions for the characterization of a system is the Gibbs free energy. It influences results like the voltage of an electrochemical cell and the equilibrium constant for a reversible reaction, among others.

Learn more about spontaneous here:

brainly.com/question/16975806

#SPJ4

3 0
1 year ago
The brain mass of a human fetus during a particular trimester can be accurately estimated from the circumference of the head by
Paladinen [302]

Answer:

a. If c = 20 cm, then the mass of the brain is m = 5 g.

b. At c = 20 cm, the brain's mass is increasing at a rate of 15.75 g/cm.

Explanation:

From the equation

m\left(c\right) = \frac{c^3}{100}-\frac{1500}{c}

we have

a. for c = 20 cm

m\left(20\right)=\frac{20^3}{100}-\frac{1500}{20}=5,

then the mass is m(20) = 5 g.

b. In order to find the rate of change, first we derivate

\frac{dm}{dc}=\frac{3c^2}{100}+\frac{1500}{c^2}.

Evaluated at c = 20 cm, we have

\frac{dm}{dc}|_{c=20}=\frac{3\times 20^2}{100}+\frac{1500}{20^2}=15.75.

So, at c = 20 cm, the mass of the brain is increasing at a rate of 15.75 g/cm.

3 0
3 years ago
De que trata la primera ley de newton
Tasya [4]
uhm i think i don’t understand what it says but i can answer if it was English ! i also tried to translate it but it didn’t help !
4 0
3 years ago
Other questions:
  • Name a characteristic property of water
    9·2 answers
  • A 2 kg mass is free falling in the negative Y direction when a 10 N force is exerted in the minus X direction. What is the accel
    8·1 answer
  • A 4.4-µF capacitor is initially connected to a 5.1-V battery. Once the capacitor is fully charged the battery is removed and a 2
    9·1 answer
  • Look at the potential energy diagram for a chemical reaction. Which statement correctly describes the energy changes that occur
    11·1 answer
  • All BUT one is a function of the cell wall. That is___
    13·1 answer
  • Which clouds are often associated with thunder and lightning?
    13·1 answer
  • What is a subatomic particle with a negative charge and very little mass?
    8·1 answer
  • PLEASE HELP WITH GIVE LIKE IF I DONT HAVE BRAINLIEST
    6·1 answer
  • Help it’s multiple choice 11 through 15 please!
    15·1 answer
  • Which of the following relationships determines an object’s ability to float in a liquid?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!