194k views
1 vote
How do I do this?

User is asked what type of 3D shape. At least 3 options must be available to select from. Be sure to tell the user what options are available to select.
User is asked what type of material the shape is made from. At least 3 options must be available to select from. Tell the user what choices there are.
Program then asks one or more questions about key geometric values necessary to calculate the volume of the selected shape.
The program calculates the volume of the shape and stores the value as a variable.
Mass is calculated by multiplying the volume by the density corresponding to the material the user selected.
The program prints out a final summary that includes: user inputs, volume calculated, material density, and mass.

1 Answer

5 votes

Final answer:

The density of a substance can be calculated by dividing its mass by its volume. The volume of a cube is calculated by cubing the edge length. Mass is usually measured using an analytical balance. The volume of liquids can be measured using a graduated cylinder, pipet, or density bottle. The volume of regular solids can be calculated from the geometric parameters.

Step-by-step explanation:

The density of a substance can be calculated by dividing its mass by its volume.

The volume of a cube is calculated by cubing the edge length.

Mass is usually measured using an analytical balance. The volume of liquids can be measured using a graduated cylinder, pipet, or density bottle. The volume of regular solids can be calculated from the geometric parameters. For example, the volume of a rectangle is equal to length x width x height. The volume of a cube is equal to the edge length cubed.