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 2000-kg car moving with a speed of 20 m/s collides with and sticks to a 1500-kg car at rest at a stop sign. Show that because
amid [387]

Answer:

13.33m/s

Explanation:

Given data

m1= 2000kg

u1= 20m/s

m2= 1500kg

u2= 0m/s

v1= 10m/s

Required

The speed of the sticks

We know that  from the expression for the conservation of momentum

m1u1+m2u2= m1v1+m2v2

2000*20+1500*0=2000*10+1500*v2

40000=20000+1500v2

collect like terms

40000-20000= 1500v2

20000= 1500v2

v2= 20000/1500

v2= 13.33 m/s

Hence the velocity of the sticks is 13.33m/s

8 0
3 years ago
PLEASE PLEASE HELP
pav-90 [236]

if in series one lightbulb burns out the rest are unable to turn on.

In parallel a single light bulb burns out any other light bulbs are able to work.

Parallel is the best to use during holidays.

6 0
3 years ago
HURRY PEASE what happens to current when there is a diode on the circuit and why?
kolbaska11 [484]

Answer:

The current can't 'split down the parallel branch, because the diode is reverse biased so is blocking the flow of current. So basically it's acting as an open circuit. Also when the current flows it wouldn't reduce the currents amount flow through the resistor.

Explanation:

6 0
3 years ago
13. A transformer has a primary coil with 600 turns and a secondary coil with 300 turns. If the output voltage is 320 volts, wha
vivado [14]
His is a step down transformer since n(primary) is greater than n(seconcary). You relate the input voltage with the ouput voltage with the following equation: 

<span>Vout = n2/n1*Vin (n2/n1 is essentially your 'transfer function' that dictates what a specified input would produce) </span>

<span>Solving the equation: </span>

<span>Vin = Vout*n1/n2 = (320V)*(600/300) = 640 V </span>

<span>This is checked by seeing if Vin is greater than Vout, which it is for a step down transformer.</span>
5 0
3 years ago
A car accelerates from rest to a speed of 8 m/s over a distance of 16 m. What is the acceleration of the car?
Marina CMI [18]
B because all you do is divide 16 and 8 to find your answer
5 0
3 years ago
Read 2 more answers
Other questions:
  • A block of mass 3.6 kg, sliding on a horizontal plane, is released with a velocity of 1.7 m/s. The block slides and stops at a d
    7·1 answer
  • How may stars are in the sky
    6·2 answers
  • Mari places a marble at the top of a ramp and lets it go. It rolls down. At the bottom of the ramp, the marble bumps into a bloc
    7·2 answers
  • A circuit in which two or more paths are connected to the voltage source
    5·1 answer
  • If an object looks blue, it reflects ____ waves.
    8·1 answer
  • Calculate the initial (from rest) acceleration of a proton in a 5.00 x 10^6 N/C electric field (such as created by a research Va
    13·1 answer
  • If an atom gains two electrons in a chemical reaction, what is its charge?
    10·1 answer
  • Why does a bowling ball have more<br> gravity than a soccer ball?
    11·2 answers
  • Question 1 of 25<br> In the covalent compound CO₂, the Greek prefix used to represent the anion is
    8·1 answer
  • in the primitive yo-yo apparatus (figure 1), you replace the solid cylinder with a hollow cylinder of mass m , outer radius r ,
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!