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
You are called as an expert witness to analyze the following auto accident: Car B, of mass 2100 kg, was stopped at a red light w
Artemon [7]

Answer:

Explanation:

Force of friction at car B ( break was applied by car B ) =μ mg = .65 x  2100 X 9.8  = 13377 N .

work done by friction = 13377 x 7.30 = 97652.1 J

If v be the common velocity of both the cars after collision

kinetic energy of both the cars = 1/2 ( 2100 + 1500 ) x v²

= 1800 v²

so , applying work - energy theory ,

1800 v² = 97652.1

v² = 54.25

v = 7.365 m /s

This is the common velocity of both the cars .

To know the speed of car A , we shall apply law of conservation of momentum  .Let the speed of car A before collision be v₁ .

So , momentum before collision = momentum after collision of both the cars

1500 x v₁ = ( 1500 + 2100 ) x 7.365

v₁ = 17.676 m /s

= 63.63 mph .

( b )

yes Car A was crossing speed limit by a difference of

63.63 - 35 = 28.63 mph.

7 0
3 years ago
The block on this incline weighs 100 kg and is connected by a cable and pulley to a weight of 10 kg. If the coefficient of frict
blondinia [14]

Answer:

a. 94.54 N

b. 0.356 m/s^2

Explanation:

Given:-

- The mass of the inclined block, M = 100 kg

- The mass of the vertically hanging block, m = 10 kg

- The angle of inclination, θ = 20°

- The coefficient of friction of inclined surface, u = 0.3

Find:-

a) The magnitude of tension in the cable

b) The acceleration of the system

Solution:-

- We will first draw a free body diagram for both the blocks. The vertically hanging block of mass m = 10 kg tends to move "upward" when the system is released.

- The block experiences a tension force ( T ) in the upward direction due the attached cable. The tension in the cable is combated with the weight of the vertically hanging block.

- We will employ the use of Newton's second law of motion to express the dynamics of the vertically hanging block as follows:

                        T - m*g = m*a\\\\  ... Eq 1

Where,

              a: The acceleration of the system

- Similarly, we will construct a free body diagram for the inclined block of mass M = 100 kg. The Tension ( T ) pulls onto the block; however, the weight of the block is greater and tends down the slope.

- As the block moves down the slope it experiences frictional force ( F ) that acts up the slope due to the contact force ( N ) between the block and the plane.

- We will employ the static equilibrium of the inclined block in the normal direction and we have:

                        N - M*g*cos ( Q )= 0\\\\N = M*g*cos ( Q )

- The frictional force ( F ) is proportional to the contact force ( N ) as follows:

                        F = u*N\\\\F = u*M*g *cos ( Q )

- Now we will apply the Newton's second law of motion parallel to the plane as follows:

                       M*g*sin(Q) - T - F = M*a\\\\M*g*sin(Q) - T -u*M*g*cos(Q)  = M*a\\ .. Eq2

- Add the two equation, Eq 1 and Eq 2:

                      M*g*sin ( Q ) - u*M*g*cos ( Q ) - m*g = a* ( M + m )\\\\a = \frac{M*g*sin ( Q ) - u*M*g*cos ( Q ) - m*g}{M + m} \\\\a = \frac{100*9.81*sin ( 20 ) - 0.3*100*9.81*cos ( 20 ) - 10*9.81}{100 + 10}\\\\a = \frac{-39.12977}{110} = -0.35572 \frac{m}{s^2}

- The inclined block moves up ( the acceleration is in the opposite direction than assumed ).

- Using equation 1, we determine the tension ( T ) in the cable as follows:

                     T = m* ( a + g )\\\\T = 10*( -0.35572 + 9.81 )\\\\T = 94.54 N

4 0
3 years ago
A wire 3.22 m long and 7.32 mm in diameter has a resistance of 11.9 mΩ. A potential difference of 33.7 V is applied between the
Scorpion4ik [409]

Answer:

(a) Current is 2831.93 A

(b) 8.40A/m^2

(c) \rho =15.52\times 10^{-9}ohm-m

Explanation:

Length of wire l = 3.22 m

Diameter of wire d = 7.32 mm = 0.00732 m

Cross sectional area of wire

A=\pi r^2=3.14\times 0.00366^2=4.20\times 10^{-5}m^2

Resistance R=11.9mohm=11.9\times 10^{-3}ohm

Potential difference V = 33.7 volt

(A) current is equal to

i=\frac{V}{R}=\frac{33.7}{11.9\times 10^{-3}}=2831.93A

(B) Current density is equal to

J=\frac{i}{A}

J=\frac{2831.93}{4.20\times 10^{-5}}=8.40A/m^2

(c) Resistance is equal to

R=\frac{\rho l}{A}

11.9\times 10^{-3}=\frac{\rho \times 3.22}{4.20\times 10^{-5}}

\rho =15.52\times 10^{-9}ohm-m

4 0
3 years ago
A 1.65 kg mass stretches a vertical spring 0.260 m If the spring is stretched an additional 0.130 m and released, how long does
Irina-Kira [14]

Answer:

The system will take approximately 0.255 seconds to reach the (new) equilibrium position.

Explanation:

We notice that block-spring system depicts a Simple Harmonic Motion, whose equation of motion is:

y(t) = A\cdot \cos \left(\sqrt{\frac{k}{m} }\cdot t +\phi\right) (1)

Where:

y(t) - Position of the mass as a function of time, measured in meters.

A - Amplitude, measured in meters.

k - Spring constant, measured in newtons per meter.

m - Mass of the block, measured in kilograms.

t - Time, measured in seconds.

\phi - Phase, measured in radians.

The spring is now calculated by Hooke's Law, that is:

k = \frac{m\cdot g}{\Delta y} (2)

Where:

g - Gravitational acceleration, measured in meters per square second.

\Delta y - Deformation of the spring due to gravity, measured in meters.

If we know that m=1.65\,kg, g = 9.807\,\frac{m}{s^{2}} and \Delta y = 0.260\,m, then the spring constant is:

k = \frac{(1.65\,kg)\cdot \left(9.807\,\frac{m}{s^{2}} \right)}{0.260\,m}

k = 62.237\,\frac{N}{m}

If we know that A = 0.130\,m, k = 62.237\,\frac{N}{m}, m=1.65\,kg, x(t) = 0\,m and \phi = 0\,rad, then (1) is reduced into this form:

0.130\cdot \cos (6.142\cdot t)=0 (1)

And now we solve for t. Given that cosine is a periodic function, we are only interested in the least value of t such that mass reaches equilibrium position. Then:

\cos (6.142\cdot t) = 0

6.142\cdot t = \cos^{-1} 0

t = \frac{1}{6.142}\cdot \left(\frac{\pi}{2} \right)\,s

t \approx 0.255\,s

The system will take approximately 0.255 seconds to reach the (new) equilibrium position.

4 0
3 years ago
You are a psychic when you tap into your other__% of your brain.
vladimir1956 [14]
20% would be probably right cuz 100% is total and 80+ what gives u 100 which is 20
4 0
3 years ago
Other questions:
  • Many people believe that the atomic number of the atom is the number of electrons in the atom. Describe when this is the case
    13·2 answers
  • For a block to move down an inclined plane what force has to be the greatest?
    5·1 answer
  • Why does heat cause a substance to expand? I. Heat causes the substance's atoms or molecules to move faster. II. The substance g
    15·1 answer
  • The length and mass of the arm are Larm = X1 = 50 cm and Marm = 0.3 kg, X2 = 15 cm, and the mass of the object is MObject = 0.25
    10·1 answer
  • A toy car is given an initial velocity of 10.0m/s and experiences a constant
    6·1 answer
  • What causes turbulence?
    13·1 answer
  • Which is a process that involves collecting information and ideas that are supported by belief or opinion?
    6·1 answer
  • Can someone plz help me with my project on soil? I will give brainliest.
    8·1 answer
  • What is the symbol that is used to indicate the fulcrum in a lever?
    9·1 answer
  • A car was struck broadside, injuring the driver. you would expect that during the collision, the driver's:_________
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!