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
Who might be experiencing psychosis?
aleksandrvk [35]

Answer:

D

Explanation:

I think the answer is D, because of hallucinations

4 0
3 years ago
A gas undergoes two processes. In the first, the volume remains constant at 0.200 m3m3 and the pressure increases from 2.50×105
SVETLANKA909090 [29]

Answer:

W = -4.95 \times 10^4\ J

Explanation:

given,

In first case Volume remains constant.

Work done in the first case is zero.

In Second case Volume change

V₁ = 0.2 m³

V₂ = 0.11 m³

Pressure, P = 5.5 x 10⁵ Pa

Work done = Pressure x change in volume

W = P ΔV

W = P(V_2-V_1)

W = 5.5\times10^5\times (0.11 - 0.2)

W = -4.95 \times 10^4\ J

Hence, Work done when volume changes is equal to W = -4.95 \times 10^4\ J

5 0
3 years ago
The amount of intensity and duration of sunlight striking earth vary with latitude
Natali5045456 [20]
Its true for sure
 
 hope this helps
8 0
3 years ago
Read 2 more answers
Which law states that for any closed loop, the sum of the length segments times the magnetic field in the direction of the segme
dedylja [7]
That's Ampere's Law.  ( C ).
The magnetic permeability is the proportionality constant.
3 0
3 years ago
Read 2 more answers
Help please
Anarel [89]

Answer:

1) D, 2) D, 3) B, 4) B, 5) C

Explanation:

You are asked to select the correct answer

1)  The conservation of energy is one of the most important principles of physics that allows solving countless problems in life.

the correct answer is D

2) when a body falls, the gravitational potential energy is transformed into kinetic energy and both are transformed into thermal energy

the correct answer is D

3) When the gravitational potential energy is maximum, the kinetic energy is minimum and when the kinetic energy is maximum, the gravitational energy is minimum.

Correct answer B

4) speed is defined by

         v = x / t

so the correct answer is B in the SI system

5) when we repeat a measurement several times, the random or statistical errors decrease, therefore the confidence of the measurement increases.

The correct answer is C

4 0
3 years ago
Other questions:
  • Taxonomists have noted that as the number of organisms decreases, ______.
    8·1 answer
  • You are on a hike in the mountains. You have 3.79 km left to go before your next campsite. The sun will set in 6.93 h. What aver
    6·1 answer
  • As soon as parachute of a falling soldier opens, how will the accleration change?​
    9·1 answer
  • A student is sitting at rest in a chair. How does the force that the student exerts
    8·1 answer
  • PLEASE HELP FAST Five-gram samples of brick and glass are at room temperature. Both samples receive equal amounts of energy due
    12·1 answer
  • A record turntable is rotating at 33 rev/min. A watermelon seed is on the turntable 9.6 cm from the axis of rotation. (a) Calcul
    11·1 answer
  • The following are steps involved in transmission at the cholinergic synapse:
    7·1 answer
  • A sound wave has a speed of
    6·1 answer
  • Burning fossil fuels and other human activities release greenhouse gases into the atmosphere. Greenhouse gas levels in the atmos
    7·1 answer
  • How to Estimate your age in seconds ?<br><br><br><br><br><br><br><br><br>No Spamming ~​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!