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
Mrs. Lynn's art class is making pencil holders out of soup cans. Each student is first covering a can with felt. What will the c
DochEvi [55]

Answer:

25.13 cm

Explanation:

Mrs. Lynn's art class is making pencil holders out of soup cans

These soup cans are definitely in cylindrical forms.

Each student is first covering a can with felt.

A felt is a type of material that is used for covering other objects. Here a felt is used to cover soup cans.

So if the diameter of the bottom of the can is 8 cm (i.e d = 8cm)

What will the circumference of the piece of felt need to be in order to cover the bottom of the can?

The felt will also take the circumference of a cylinder; and which is given by the expression

C = 2 πr

since diameter (d) = 8 cm

radius (r) = \frac{d}{2}

r = \frac{8}{2}

r = 4 cm

C = 2 × π × 4 cm

C = 2 × 3.142 × 4 cm

C = 25.13 cm

∴ the circumference of the piece of felt need to be 25.13 cm in order to cover the bottom of the can.

6 0
3 years ago
A 20 kg object is floating in space. What is its mass?
trapecia [35]

It's still 20 kg. Mass doesn't change according to gravity, only weight changes.

5 0
3 years ago
If the new moon happens on January 15th, what shape will it be on February 6th?
Jobisdone [24]

-- From January 15 to February 6 is a period of 22 days.

-- The period of the full cycle of moon phases is 29.53 days.

-- So those dates represent (22/29.53) = 74.5% of a full cycle of phases.

-- That's almost exactly 3/4 of a full cycle, so on February 6, the moon would be almost exactly at <em>Third Quarter</em>.  That's the <em>left half of a disk </em>(viewed from the northern hemisphere).

3 0
3 years ago
What are stars made from
kap26 [50]

Stars are made of very hot gas. This gas is mostly hydrogen and helium, which are the two lightest elements. Stars shine by burning hydrogen into helium in their cores, and later in their lives create heavier elements.

3 0
3 years ago
A force of 3 newtons moves a 10 kilogram mass horizontally a distance of 3 meters. The mass does not slow down or speed up as it
Mashutka [201]

Answer:

9 joules of heat energy was produced

Explanation: there is no acceleration therefore its not a kinetic energy

Energy= force × distance

= 3×3

=9

3 0
3 years ago
Other questions:
  • Bode's Law: correctly predicted the location of Jupiter, uses a number sequence to determine planetary distances, incorrectly pr
    7·1 answer
  • What are the divisions within a shell called
    13·1 answer
  • 25 POINTS and brainiest answer for General Science help!
    9·2 answers
  • Who created dogs<br>human<br>nature<br>wolfs<br>nobody
    6·2 answers
  • Find change of velocity for:<br> 0-1.7 s<br> 1.7-6s
    8·1 answer
  • If your vehicle bounces a lot after a bump or is hard to control on turns, you may have a problem with __________ system.
    9·1 answer
  • A satellite is in a circular orbit around the Earth at an altitude of 3.18x10 m. Find the period and th orbital speed of the sat
    6·1 answer
  • A car's engine generates 100,000W of power as it exerts a force of 10,000N . How long does it take the car to travel 100m ?
    8·1 answer
  • A 735 kg object and a 1.37×1012 kg are located 2.59×104 m away from each other. What is the force due to gravity between the two
    8·1 answer
  • Plz help me thank you
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!