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]
4 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]4 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]4 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
2. An electric motor transfers 2003 in 10.0 s. If it then transfers the same amount of energy in 8.0 s, has its
Marizza181 [45]

Answer:

decreased

Explanation:

because it transfered from 10.0s

to 8.0s

5 0
2 years ago
If a star has a parallax of 0.050 arc second, what is its distance in pc? In ly? In AU? Seeds, Michael A.. Universe: Solar Syste
vaieri [72.5K]

Answer:

Distance in pc= 20parsecs

Distance in zLY= 65.2LY

Distance in AU= 4.1×10^6AU

Explanation:

Using the formular:

d = 1/p

Where d = distance

P= parallax angle in arc of second

d= 1/0.050

d= 20 parsed

Converting to Lighy years,LY :

1 PC = 3.26LY

d= 20pc × (3.26Ly/1pc)

d= 65.2Ly

To convert to AU, 206,265 AU = 1pc

d= 20pc × (2.06×10^5AU/1pc)

d= 4.1×10^6AU

5 0
4 years ago
Read 2 more answers
The location(s) an electron can occupy around the nucleus depends on the electron's ____________.
enyata [817]
I think that it is mass?
6 0
3 years ago
Read 2 more answers
17. Calculate the amount of gravitational potential energy at the top of one 4 points hill. The mass of the coaster is 500 kg. T
MissTica

Answer: D. 292,338 J

This is the correct answer :)

4 0
3 years ago
A proton enters a constant magnetic field of magnitude 0.050 t and traverses a semicircle of radius 1.0 mm before leaving the fi
ElenaW [278]

Velocity of proton= 4782 m/s

Explanation:

For proton, the centripetal force required for circular motion is provided by the magnetic force,

so Fm= Fc

q v B = m v²/r

m= mass of proton

v= velocity

B =magnetic field=0.05 T

q= charge= 1.6 x 10⁻¹⁹

r= radius = 1 mm =0.001 m

v= q B r/m

V= (1.6 x 10⁻¹⁹)(0.05)(0.001)/(1.673 x 10⁻²⁷)

V= 4782 m/s

4 0
4 years ago
Other questions:
  • A person who weighs 625 N is riding a 98-N mountain bike. Suppose that the entire weight of the rider and bike is supported equa
    13·1 answer
  • 2. The product of an object’s mass and velocity is its
    8·2 answers
  • A 6.0-n net force is applied to a 1.5-kg mass. what is the object’s acceleration? in the direction of the net force
    12·1 answer
  • What causes the northern and southern halves of the planet to experience winter and summer at opposite times?
    13·1 answer
  • I'm looking at the barometer in my lab as i type this question. it says the pressure is 0.905 atm. what is this pressure express
    7·1 answer
  • A disk rotates freely on a vertical axis with an angular velocity of 50 rpm . An identical disk rotates above it in the same dir
    5·1 answer
  • The distance between Earth and the sun is roughly 150,000,000 km. If it takes sunlight 8.3 min to reach Earth, what is the speed
    5·1 answer
  • When a ray of light passes at an angle to the normal from one material into another material in which its speed is higher?
    5·1 answer
  • The energy for _____ transport comes from the gradient itself
    7·1 answer
  • Which term does the phrase "an explanation of a natural phenomenon that is supported by facts gathered from many scientific inve
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!